Adaptive Loop Filter with Fixed Filter
A two-stage adaptive loop filtering process in video decoders improves decoded video quality by accounting for local features, surpassing the limitations of single-stage filtering.
Patent Information
- Application Number
- JP2023535712
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Priority Date
- 2021-12-21
- Filing Date
- 2021-12-22
- Publication Date
- 2026-03-05
- Estimated Expiration
- 2041-12-22
Smart Images

Figure 0007824958000068 
Figure 0007824958000069 
Figure 0007824958000070
Abstract
Description
[Technical Field]
[0001]
[0001] This application claims priority to U.S. Patent Application No. 17 / 557,706, filed December 21, 2021, U.S. Provisional Patent Application No. 63 / 148,538, filed February 11, 2021, and U.S. Provisional Patent Application No. 63 / 130,275, filed December 23, 2020, the entire contents of each of which are incorporated herein by reference. U.S. Patent Application No. 17 / 557,706, filed December 21, 2021, claims the benefit of U.S. Provisional Patent Application No. 63 / 148,538, filed February 11, 2021, and U.S. Provisional Patent Application No. 63 / 130,275, filed December 23, 2020.
[0002] FIELD OF THE DISCLOSURE
[0002] This disclosure relates to video encoding and video decoding. [Background technology]
[0003] Digital video capabilities may 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 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 may transmit, receive, encode, decode, and / or store digital video information more efficiently.
[0004]
[0004] Video coding techniques include spatial (intra-picture) prediction and / or temporal (inter-picture) prediction to reduce or remove 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 partitioned into video blocks, which may also be referred to as coding tree units (CTUs), coding units (CUs), and / or coding nodes. Video blocks in an intra-coded (I) slice of a picture are encoded using spatial prediction with respect to reference samples in neighboring blocks in the same picture. Video blocks in an inter-coded (P or B) slice of a picture may use spatial prediction with respect to reference samples in neighboring blocks in the same picture or temporal prediction with respect to reference samples in other reference pictures. A picture may be referred to as a frame, and a reference picture may be referred to as a reference frame. Summary of the Invention
[0005] According to the techniques of this disclosure, a video decoder may be configured to perform two-stage adaptive loop filtering. For the first stage of ALF, the video decoder may be configured to determine an activity value and a direction value for a reconstructed sample to be filtered. The activity value may generally indicate the variance of sample values in a neighborhood of samples surrounding the sample to be filtered. The direction value may generally indicate the direction in which the sample values are changing, such as whether the sample values are increasing horizontally, increasing vertically, increasing at 45 degrees, increasing at 135 degrees, or not increasing at all. Based on the activity value and the direction value, the video decoder may determine a class index for the sample to be filtered. The class index may be associated with a filter from a first set of filters, each filter defined by a shape and a set of coefficient values. The video decoder may determine a first set of filters and which classifiers correspond to which filters based on syntax included in the bitstream. The video decoder may apply the filters to the reconstructed samples to determine a first intermediate sample value.
[0006] For the second stage of the ALF, the video decoder determines a first sample modification value by applying a second filter to the reconstructed sample, and determines a second sample modification value based on the first intermediate sample value. Then, the video decoder determines a filtered reconstructed sample based on the reconstructed sample, the first sample modification value, and the second sample modification value. As described herein, by applying the first stage ALF to the reconstructed samples of a reconstructed block and applying the second stage ALF to the reconstructed samples, the techniques of this disclosure may improve the overall quality of the decoded video data better than can be done by a single stage ALF by taking into account local features of the video data.
[0007] According to one example, a method for decoding video data includes applying a first stage adaptive loop filter (ALF) to reconstructed samples of a reconstructed block, wherein applying the first stage ALF comprises determining a first class index for the reconstructed samples, selecting a filter from a first set of filters based on the first class index, and applying the filter from the first set of filters to the reconstructed samples to determine a first intermediate sample value; and applying a second stage ALF to the reconstructed samples, wherein applying the second stage ALF comprises determining a second class index for the reconstructed samples. determining a first intermediate sample index; selecting a second filter from a second set of filters based on the second class index; applying the second filter to the reconstructed samples to determine a first sample modification value; and determining the second sample modification value based on the first intermediate sample value; and determining a filtered reconstructed sample based on the reconstructed samples, the first sample modification value, and the second sample modification value.
[0008]
[0008] According to one example, a device for decoding video data is implemented with a memory configured to store the video data and a circuit, and applies a first stage adaptive loop filter (ALF) to reconstructed samples of a reconstruction block, wherein to apply the first stage ALF, one or more processors are further configured to: determine a first class index for the reconstructed samples; select a filter from a first set of filters based on the first class index; apply the filter from the first set of filters to the reconstructed samples to determine a first intermediate sample value; and apply a second stage adaptive loop filter (ALF) to the reconstructed samples. applying an ALF, wherein, to apply a second stage ALF, the one or more processors are further configured to: determine a second class index for the reconstructed sample; select a second filter from a second set of filters based on the second class index; apply the second filter to the reconstructed sample to determine a first sample modification value; and determine the second sample modification value based on the first intermediate sample value; and determine a filtered reconstructed sample based on the reconstructed sample, the first sample modification value, and the second sample modification value.
[0009]
[0009] According to one example, the computer-readable storage medium, when executed by one or more processors, is further configured to cause the one or more processors to apply a first stage adaptive loop filter (ALF) to reconstructed samples of a reconstructed block, wherein, to apply the first stage ALF, the one or more processors determine a first class index for the reconstructed block, select a filter from a first set of filters based on the first class index, and apply the filter from the first set of filters to the reconstructed samples to determine a first intermediate sample value; and apply a second stage ALF to the reconstructed samples. applying F, wherein to apply a second stage of ALF, the one or more processors are further configured to: determine a second class index for the reconstructed sample; select a second filter from a second set of filters based on the second class index; apply the second filter to the reconstructed sample to determine a first sample modification value; determine the second sample modification value based on the first intermediate sample value; and determine a filtered reconstructed sample based on the reconstructed sample, the first sample modification value, and the second sample modification value.
[0010]
[0010] The details of one or more examples are set forth in the accompanying drawings and the description below. Other features, objects, and advantages will become apparent from the description, drawings, and claims. [Brief explanation of the drawings]
[0011] [Figure 1]
[0011] FIG. 1 is a block diagram illustrating an example video encoding and decoding system that may implement the techniques of this disclosure. [Figure 2A]
[0012] 1 is a conceptual diagram illustrating an example adaptive loop filter shape that may be used in accordance with the techniques of this disclosure. [Figure 2B] 1 is a conceptual diagram illustrating an example adaptive loop filter shape that may be used in accordance with the techniques of this disclosure. [Figure 3]
[0013] 10 is a conceptual diagram illustrating example subsampled Laplacian values for a 4×4 sub-block adaptive loop filter classification that may be used in accordance with the techniques of this disclosure. [Figure 4]
[0014] 1 is a conceptual diagram illustrating example Laplacian values for luma samples that may be used in accordance with the techniques of this disclosure. [Figure 5]
[0015] 1 is a conceptual diagram illustrating an example of adaptive loop filter class merging that may be used in accordance with the techniques of this disclosure. [Figure 6]
[0016] 1 is a conceptual diagram illustrating an example geometric transformation of a 7×7 diamond filter shape that may be used in accordance with the techniques of this disclosure. [Figure 7A]
[0017] FIG. 10 illustrates an example of symmetric sample padding in ALF, which may be used in accordance with the techniques of this disclosure. [Figure 7B] FIG. 10 illustrates an example of symmetric sample padding in ALF, which may be used in accordance with the techniques of this disclosure. [Figure 7C] FIG. 10 illustrates an example of symmetric sample padding in ALF, which may be used in accordance with the techniques of this disclosure. [Figure 8]
[0018] FIG. 10 illustrates an example of ALF 4×4 sub-block classification that may be used in accordance with the techniques of this disclosure. [Figure 9]
[0019] 1 illustrates an example framework for filtering reconstructed samples of video data using multiple fixed filter sets and multiple signaled filter sets, in accordance with the techniques of this disclosure. [Figure 10A]
[0020] 10A-10C illustrate examples of 5x5 filters that may be used in accordance with the techniques of this disclosure. [Figure 10B] 10A-10C illustrate examples of 7x7 filters that may be used in accordance with the techniques of this disclosure. [Figure 10C] 10A-10C illustrate examples of 9x9 filters that may be used in accordance with the techniques of this disclosure. [Figure 10D] FIG. 10 illustrates an example of an 11×11 filter that may be used in accordance with the techniques of this disclosure. [Figure 10E] 13A-13D illustrate examples of 13x13 filters that may be used in accordance with the techniques of this disclosure. [Figure 11]
[0021] 10A-10C illustrate examples for implementing multiple fixed filters along with one signaled filter in accordance with the techniques of this disclosure. [Figure 12A]
[0022] 10A-10C illustrate examples of two-part filters that may be used in accordance with the techniques of this disclosure. [Figure 12B] 10A-10C illustrate examples of two-part filters that may be used in accordance with the techniques of this disclosure. [Figure 12C] 10A-10C illustrate examples of two-part filters that may be used in accordance with the techniques of this disclosure. [Figure 12D] 10A-10C illustrate examples of two-part filters that may be used in accordance with the techniques of this disclosure. [Figure 12E] 10A-10C illustrate examples of two-part filters that may be used in accordance with the techniques of this disclosure. [Figure 13]
[0023] FIG. 1 is a conceptual diagram illustrating an example ALF framework in accordance with the techniques of this disclosure. [Figure 14] FIG. 1 is a conceptual diagram illustrating an example ALF framework in accordance with the techniques of this disclosure. [Figure 15]
[0024] 1 is a block diagram illustrating an example video encoder that may implement the techniques of this disclosure. [Figure 16]
[0025] 1 is a block diagram illustrating an example video decoder that may implement the techniques of this disclosure. [Figure 17]
[0026] FIG. 10 is a block diagram illustrating an example filter unit for performing the techniques of this disclosure. [Figure 18]
[0027] 10 is a flowchart illustrating an example process for encoding a current block in accordance with techniques of this disclosure. [Figure 19]
[0028] 10 is a flowchart illustrating an example process for decoding a current block in accordance with techniques of this disclosure. [Figure 20]
[0029] 10 is a flowchart illustrating an example process for decoding a current block in accordance with techniques of this disclosure. DETAILED DESCRIPTION OF THE INVENTION
[0012]
[0030] Video coding (e.g., video encoding and / or video decoding) generally involves either predicting a block of video data from already coded blocks of video data in the same picture (i.e., intra prediction) or predicting a block of video data from already coded blocks of video data in a different picture (i.e., inter prediction). In some instances, the video encoder also calculates residual data by comparing the predictive block to the original block. The residual data thus represents the difference between the predictive block and the original block. The video encoder transforms and quantizes the residual data and signals the transformed and quantized residual data in the encoded bitstream. The video decoder adds the residual data to the predictive block to generate a reconstructed video block that matches the original video block more closely than the predictive block alone. To further improve the quality of the decoded video, the video decoder may perform one or more filtering operations on the reconstructed video block. Examples of these filtering operations include deblock filtering, sample adaptive offset (SAO) filtering, and adaptive loop filtering (ALF). The parameters for these filtering operations may either be determined by the video encoder and explicitly signaled in the coded video bitstream, or may be implicitly determined by the video decoder without the parameters having to be explicitly signaled in the coded video bitstream.
[0013]
[0031] This disclosure describes techniques associated with filtering reconstructed video data in video encoding and / or video decoding processes, and more particularly, this disclosure describes techniques related to ALF, although the described techniques may potentially be applied to other filtering schemes as well.
[0014]
[0032] According to the techniques of this disclosure, a video decoder may be configured to perform two-stage adaptive loop filtering. For the first stage of the ALF, the video decoder may be configured to determine an activity value and a direction value for a reconstructed sample to be filtered. The activity value may generally indicate the variance of sample values in a neighborhood of samples surrounding the sample to be filtered. The direction value may generally indicate the direction in which the sample values are changing, such as whether the sample values are increasing horizontally, increasing vertically, increasing at 45 degrees, increasing at 135 degrees, or not increasing at all. Based on the activity value and the direction value, the video decoder may determine a class index for the filtered sample. The class index may be associated with a filter from a first set of filters, each filter defined by a shape and a set of coefficient values. The video decoder may determine the first set of filters and which classifier corresponds to which filter based on syntax included in the bitstream. The video decoder may apply the filters to the reconstructed sample to determine a first intermediate sample value.
[0015]
[0033] For the second stage of the ALF, the video decoder determines first sample modification values by applying a second filter to the reconstructed samples and determines second sample modification values based on the first intermediate sample values. Then, the video decoder determines filtered reconstructed samples based on the reconstructed samples, the first sample modification values, and the second sample modification values. By applying the first stage ALF to the reconstructed samples of the reconstructed block and the second stage ALF to the reconstructed samples as described herein, the techniques of this disclosure may improve the overall quality of the decoded video data better than can be done by a single stage ALF by taking into account local features of the video data.
[0016]
[0034] 1 is a block diagram illustrating an example video encoding and decoding system 100 that may implement techniques of this disclosure. The techniques of this disclosure are generally directed to coding (encoding and / or decoding) video data. Generally, the video data includes some data for processing the video. Thus, the video data may include raw uncoded video, coded video, decoded (e.g., reconstructed) video, and video metadata, such as signaling data.
[0017]
[0035] 1, system 100 includes a source device 102 that, in this example, provides encoded video data to be decoded and displayed by a destination device 116. In particular, source device 102 provides the 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 therefore may be referred to as wireless communication devices.
[0018]
[0036] In the example of FIG. 1 , source device 102 includes a video source 104, memory 106, video encoder 200, and output interface 108. Destination device 116 includes an input interface 122, a video decoder 300, memory 120, and a display device 118. According to this disclosure, video encoder 200 of source device 102 and video decoder 300 of destination device 116 may be configured to apply techniques for adaptive loop filtering using first and second stages in a manner described herein. 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, the source and destination devices may include other components or arrangements. For example, source device 102 may receive video data from an external video source, such as an external camera. Similarly, destination device 116 may interface with an external display device rather than including an integrated display device.
[0019]
[0037] The system 100 shown in FIG. 1 is merely an example. In general, any digital video encoding and / or decoding device may perform the techniques for adaptive loop filtering described herein. 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 “coding” device as a device that performs coding (encoding and / or decoding) of data. Accordingly, video encoder 200 and video decoder 300 represent examples of coding devices, particularly video encoders and video decoders, respectively. In some examples, source device 102 and destination device 116 may operate substantially symmetrically, such that each of source device 102 and destination device 116 includes video encoding and video decoding components. Thus, system 100 may support unidirectional or bidirectional video transmission between source device 102 and destination device 116, for example, video streaming, video playback, video broadcasting, or video telephony.
[0020]
[0038] Generally, video source 104 represents a source of video data (i.e., raw, unencoded video data) and provides a continuous series of pictures (also called “frames”) of the video data to video encoder 200, which encodes the data for the pictures. Video source 104 of source device 102 may include a video capture device, such as a video camera, a video archive containing previously captured live video, and / or a video feed interface for receiving video from a video content provider. As a further alternative, video source 104 may generate computer-graphics-based data or a combination of live, archived, and computer-generated video as the source video. In each case, video encoder 200 encodes the captured, pre-captured, or computer-generated video data. Video encoder 200 may reorder the pictures from their received order (sometimes referred to as “display order”) into a coding order for coding. Video encoder 200 may generate a bitstream including the encoded video data. Source device 102 may then output the encoded video data via output interface 108 onto computer-readable medium 110 for receipt and / or retrieval by, for example, input interface 122 of destination device 116 .
[0021]
[0039] Memory 106 of source device 102 and memory 120 of destination device 116 represent general-purpose memory. In some examples, memory 106, 120 may store raw video data, e.g., raw video from video source 104 and raw decoded video data from video decoder 300. Additionally or alternatively, memory 106, 120 may store software instructions executable by, e.g., video encoder 200 and video decoder 300, respectively. While memory 106 and memory 120 are shown separate 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, memory 106, 120 may store encoded video data, e.g., output from video encoder 200 and input to video decoder 300. In some examples, portions of the memory 106, 120 may be allocated as one or more video buffers, for example, to store raw decoded and / or encoded video data.
[0022]
[0040] 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. In one example, the computer-readable medium 110 represents a communication medium for enabling the source device 102 to transmit encoded video data directly to the destination device 116 in real time, for example, via a radio frequency network or a computer-based network. The output interface 108 may modulate a transmission signal containing the encoded video data, and the input interface 122 may demodulate a received transmission signal, in accordance with a communication standard such as a wireless communication protocol. 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 for facilitating communication from the source device 102 to the destination device 116.
[0023]
[0041] In some examples, source device 102 may output encoded data from output interface 108 to storage device 112. Similarly, destination device 116 may access encoded data from storage device 112 via input interface 122. 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.
[0024]
[0042] In some examples, source device 102 may output the encoded video data to file server 114 or another intermediate storage device, which may store the encoded video data generated by source device 102. Destination device 116 may access the stored video data from file server 114 via streaming or download.
[0025]
[0043] File server 114 may be any type of server device capable of storing encoded video data and transmitting the encoded video data to destination device 116. File server 114 may represent a web server (e.g., for a website), a server configured to provide file transfer protocol services (such as File Transfer Protocol (FTP) or 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. File server 114 may additionally 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), HTTP Dynamic Streaming, etc.
[0026]
[0044] Destination device 116 may access the encoded video data from file server 114 through any standard data connection, including an Internet connection. This may include a wireless channel (e.g., a Wi-Fi connection), a wired connection (e.g., a digital subscriber line (DSL), a cable modem, etc.), or a combination of both, that is suitable for accessing the encoded video data stored on file server 114. Input interface 122 may be configured to operate according to any one or more of the various protocols described above for retrieving or receiving media data from file server 114, or other such protocols for retrieving media data.
[0027]
[0045] 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 in which output interface 108 and input interface 122 comprise wireless components, output interface 108 and input interface 122 may be configured to transfer data, such as encoded video data, according to a cellular communication standard, such as 4G, 4G-LTE (Long Term Evolution), LTE-Advanced, 5G, etc. In some examples in which output interface 108 comprises a wireless transmitter, 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), the Bluetooth standard, etc. In some examples, source device 102 and / or destination device 116 may include respective system-on-chip (SoC) devices. For example, the source device 102 may include an SoC device for performing functions attributed to the video encoder 200 and / or the output interface 108, and the destination device 116 may include an SoC device for performing functions attributed to the video decoder 300 and / or the input interface 122.
[0028]
[0046] The techniques of this disclosure may be applied to video coding supporting any of a variety of multimedia applications, such as over-the-air television broadcast, 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.
[0029]
[0047] The input interface 122 of the destination device 116 receives the encoded video bitstream from the computer-readable medium 110 (e.g., a communications medium, a storage device 112, a file server 114, etc.). The encoded video bitstream may include signaling information defined by the video encoder 200 that is 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, groups of pictures, sequences, etc.). The display device 118 displays a decoded picture of the decoded video data to a user. The display device 118 may represent any of a variety of display devices, such as a liquid crystal display (LCD), a plasma display, an organic light-emitting diode (OLED) display, or another type of display device.
[0030]
[0048] 1, in some examples, video encoder 200 and video decoder 300 may each be integrated with an audio encoder and / or decoder and may include an appropriate MUX-DEMUX unit or other hardware and / or software to handle multiplexed streams that include both audio and video in a common data stream. Where applicable, the MUX-DEMUX unit may conform to the ITU H.223 multiplexer protocol or other protocols such as the User Datagram Protocol (UDP).
[0031]
[0049] The video encoder 200 and the video decoder 300 may each be implemented as any of a variety of suitable encoder and / or decoder circuits, or any combination thereof, 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, etc. When the techniques are implemented partially in software, a device may store instructions for the software on a suitable non-transitory computer-readable medium and execute the instructions in hardware using one or more processors to implement the techniques of this disclosure. The video encoder 200 and the video decoder 300 may each be included in one or more encoders or decoders, any of which may be integrated as part of a combined encoder / decoder (CODEC) in the respective device. The device including the video encoder 200 and / or the video decoder 300 may comprise an integrated circuit, a microprocessor, and / or a wireless communication device such as a cellular phone.
[0032]
[0050] Video encoder 200 and video decoder 300 may operate in accordance with a video coding standard, such as ITU-T H.265, also known as High Efficiency Video Coding (HEVC), or extensions thereof, such as multiview and / or scalable video coding extensions. Alternatively, 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)," Joint Video Experts Team (JVET) of ITU-T SG16 WP3 and ISO / IEC JTC 1 / SC29 / WG11, 18th Meeting, by Video Conference, June 22-July 1, 2020, JVET-S2001-v17 (hereinafter "VVC Draft 10"). However, the techniques of this disclosure are not limited to any particular coding standard, and furthermore, it is expressly contemplated that the techniques described herein may be used in conjunction with successor standards to VVC.
[0033]
[0051] Generally, the video encoder 200 and the video decoder 300 may perform block-based coding of pictures. 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 include a two-dimensional matrix of luminance and / or chrominance data samples. Generally, the video encoder 200 and the video decoder 300 may code video data represented in YUV (e.g., Y, Cb, Cr) format. That is, rather than coding red, green, and blue (RGB) data for a picture sample, the video encoder 200 and the video decoder 300 may code a luminance component and a chrominance component, where the chrominance component may include both red and blue hues of chrominance components. In some examples, the video encoder 200 converts received RGB-formatted data to a YUV representation prior to encoding, and the video decoder 300 converts the YUV representation to an RGB format. Alternatively, pre-processing and post-processing units (not shown) may perform these conversions.
[0034]
[0052] This disclosure may generally refer to coding (e.g., encoding and decoding) a picture to include the process of encoding or decoding data for a picture. Similarly, this disclosure may refer to coding a block of a picture to include the process of encoding or decoding data for the block, e.g., predictive and / or residual coding. A coded video bitstream generally includes a series of values for syntax elements that represent coding decisions (e.g., coding modes) and the partitioning of a picture into blocks. Thus, references to coding a picture or a block should be understood generally as coding values for the syntax elements that form the picture or block.
[0035]
[0053] HEVC defines various blocks, including coding units (CUs), prediction units (PUs), and transform units (TUs). According to HEVC, a video coder (such as video encoder 200) partitions coding tree units (CTUs) into CUs according to a quadtree structure. That is, the video coder partitions CTUs and CUs into four equal, non-overlapping squares, and each node of the quadtree has either zero or four child nodes. A node with no child nodes may be referred to as a "leaf node," and a CU of such a leaf node may include one or more PUs and / or one or more TUs. The video coder may further partition PUs and TUs. For example, in HEVC, a residual quadtree (RQT) represents the partitioning of TUs. In HEVC, a PU represents inter-predicted data, while a TU represents residual data. An intra-predicted CU includes intra-prediction information, such as an intra-mode indication.
[0036]
[0054] As another example, video encoder 200 and video decoder 300 may be configured to operate according to VVC. According to VVC, a video coder (such as video encoder 200) partitions a picture into multiple coding tree units (CTUs). Video encoder 200 may partition the CTUs according to a tree structure, such as a quad-tree binary tree (QTBT) structure or a multi-type tree (MTT) structure. The QTBT structure eliminates the concept of multiple partition types, such as the separation between CUs, PUs, and TUs in HEVC. The QTBT structure includes two levels: a first level partitioned according to quad-tree partitioning and a second level partitioned according to binary tree partitioning. The root node of the QTBT structure corresponds to a CTU. The leaf nodes of the binary tree correspond to coding units (CUs).
[0037]
[0055] In the MTT partitioning structure, blocks may be partitioned using quad tree (QT) partitioning, binary tree (BT) partitioning, and one or more types of triple tree (TT) (also called ternary tree (TT)) partitioning. Triple tree or ternary tree partitioning is a partitioning in which a block is split into three sub-blocks. In some examples, triple tree or ternary tree partitioning divides a block into three sub-blocks without splitting the original block through the center. The partitioning types in MTT (e.g., QT, BT, and TT) can be symmetric or asymmetric.
[0038]
[0056] In some examples, the video encoder 200 and the video decoder 300 may use a single QTBT or MTT structure to represent each of the luminance and chrominance components, and in other examples, the video encoder 200 and the video decoder 300 may use two or more QTBT or MTT structures, such as one QTBT / MTT structure for the luminance component and another QTBT / MTT structure for both chrominance components (or two QTBT / MTT structures for each chrominance component).
[0039]
[0057] Video encoder 200 and video decoder 300 may be configured to use quadtree partitioning, QTBT partitioning, MTT partitioning, or other partition structures according to HEVC. For illustrative purposes, the description of the techniques of this disclosure is presented with respect to QTBT partitioning. However, it should be understood that the techniques of this disclosure may also be applied to video coders configured to use quadtree partitioning, or other types of partitioning as well.
[0040]
[0058] In some examples, a CTU includes a coding tree block (CTB) of luma samples, two corresponding CTBs of chroma samples for a picture with three sample arrays, or a CTB of samples for a monochrome picture, or a picture coded using three separate color planes and syntax structures used to code the samples. A CTB can be an N×N block of samples, for some value of N such that the division of the components into the CTB is partitioned. A component is an array or a single sample from one of three arrays (luma and two chroma) that configure the picture in 4:2:0, 4:2:2, or 4:4:4 color format, or an array or a single sample of an array that configures the picture in monochrome format. In some examples, a coding block is an M×N block of samples, for some value of M and N such that the division of the CTB into coding blocks is partitioned.
[0041]
[0059] Blocks (e.g., CTUs or CUs) may be grouped in various ways in a picture. As an example, a brick may refer to a rectangular region of a CTU row within a particular tile in a picture. A tile may be a rectangular region of a CTU within a particular tile column and a particular tile row in a picture. A tile column refers to a rectangular region of a CTU having 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 region of a CTU having a height specified by a syntax element (e.g., in a picture parameter set) and a width equal to the width of the picture.
[0042]
[0060] In some examples, a tile may be partitioned into multiple bricks, each of which may contain one or more CTU rows within the tile. A tile that is not partitioned into multiple bricks may also be referred to as a brick. However, a brick that is a true subset of a tile may not be referred to as a tile.
[0043]
[0061] The bricks in a picture may also be arranged into slices. A slice may be an integer number of bricks of a picture that may be contained entirely in a single Network Abstraction Layer (NAL) unit. In some examples, a slice includes either several complete tiles or only a continuous sequence of complete bricks of one tile.
[0044]
[0062] This disclosure may use "N x N" and "N by N" interchangeably to refer to the sample dimensions of a block (such as a CU or other video block) in terms of the vertical and horizontal dimensions, e.g., 16 x 16 samples or 16 by 16 samples. Generally, a 16 x 16 CU has 16 samples in the vertical direction (y = 16) and 16 samples in the horizontal direction (x = 16). Similarly, an N x N CU generally has N samples in the vertical direction and N samples in the horizontal direction, where N represents a non-negative integer value. Samples in a CU may be arranged in rows and columns. Moreover, a CU does not necessarily have to have the same number of samples in the horizontal direction as in the vertical direction. For example, a CU may comprise N x M samples, where M is not necessarily equal to N.
[0045]
[0063] The video encoder 200 encodes video data for a CU that represents prediction and / or residual information, as well as other information. The prediction information indicates how the CU should be predicted to form a predictive block for the CU. The residual information generally represents sample-by-sample differences between the samples of the CU prior to encoding and the predictive block.
[0046]
[0064] To predict a CU, the video encoder 200 may generally form a predictive block for the CU through inter-prediction or intra-prediction. Inter-prediction generally refers to predicting a CU from data of a previously coded picture, while intra-prediction generally refers to predicting a CU from previously coded data of the same picture. To perform inter-prediction, the video encoder 200 may generate a predictive block using one or more motion vectors. The video encoder 200 may generally perform motion search to identify a reference block that closely matches the CU, e.g., with respect to the difference between the CU and the reference block. The video encoder 200 may calculate a difference metric using a sum of absolute differences (SAD), a sum of squared differences (SSD), a mean absolute difference (MAD), a mean squared difference (MSD), or other such difference calculation to determine whether the reference block closely matches the current CU. In some examples, the video encoder 200 may predict the current CU using unidirectional prediction or bidirectional prediction.
[0047]
[0065] Some examples of VVC also provide an affine motion compensation mode, which may be considered an inter-prediction mode. In an affine motion compensation mode, video encoder 200 may determine two or more motion vectors that represent non-translational motion, such as zooming in or out, rotation, perspective motion, or other irregular motion types.
[0048]
[0066] To perform intra prediction, video encoder 200 may select an intra prediction mode to generate a predicted block. Some examples of VVC provide 67 intra prediction modes, including various directional modes, as well as planar and DC modes. Generally, video encoder 200 selects an intra prediction mode that describes neighboring samples relative to a current block (e.g., a block of a CU) from which samples of the current block should be predicted. Such samples may generally be above, above-left, or to the left of the current block in the same picture as the current block, assuming that video encoder 200 codes CTUs and CUs in raster scan order (left to right, top to bottom).
[0049]
[0067] Video encoder 200 encodes data representing a prediction mode for the current block. For example, in an inter prediction mode, video encoder 200 may encode data representing which of various available inter prediction modes is used, as well as motion information for the corresponding mode. For example, in unidirectional or bidirectional inter prediction, video encoder 200 may encode motion vectors using advanced motion vector prediction (AMVP) or merge mode. Video encoder 200 may use similar modes to encode motion vectors for affine motion compensation modes.
[0050]
[0068] Following prediction, such as intra-prediction or inter-prediction, of a block, the video encoder 200 may calculate residual data for the block. The residual data, such as a residual block, represents sample-by-sample differences between the block and a predictive block for the block formed using a corresponding prediction mode. The video encoder 200 may apply one or more transforms to the residual block to generate transform data in a transform domain rather than the sample domain. For example, the video encoder 200 may apply a discrete cosine transform (DCT), an integer transform, a wavelet transform, or a conceptually similar transform to the residual video data. Furthermore, the video encoder 200 may apply a secondary transform, such as a mode-dependent non-separable secondary transform (MDNSST), a signal-dependent transform, or a Karhunen-Loeve transform (KLT), following the first transform. The video encoder 200 generates transform coefficients following application of the one or more transforms.
[0051]
[0069] As described above, following any transformation to generate transform coefficients, the video encoder 200 may perform quantization of the transform coefficients. Quantization generally refers to a process in which transform coefficients are quantized to possibly reduce the amount of data used to represent the transform coefficients, thereby providing further compression. By performing the quantization process, the video encoder 200 may reduce the bit depth associated with some or all of the transform coefficients. For example, the video encoder 200 may round 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.
[0052]
[0070] Following quantization, the video encoder 200 may scan the transform coefficients to generate a one-dimensional vector from a two-dimensional matrix including the quantized transform coefficients. The scan may be designed to place transform coefficients of higher energy (and therefore lower frequency) at the front of the vector and transform coefficients of lower energy (and therefore higher frequency) at the back of the vector. In some examples, the video encoder 200 may utilize a predefined scan order to scan the quantized transform coefficients to generate a serialized vector and then entropy encode the quantized transform coefficients of the vector. In other examples, the video encoder 200 may perform adaptive scanning. After scanning the quantized transform 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 describing metadata associated with the encoded video data for use by the video decoder 300 in decoding the video data.
[0053]
[0071] To implement CABAC, video encoder 200 may assign a context in a context model to a symbol to be transmitted. The context may relate, for example, to whether neighboring values of the symbol are zero values. A probability determination may be based on the context assigned to the symbol.
[0054]
[0072] Video encoder 200 may further generate syntax data, such as block-based syntax data, picture-based syntax data, and sequence-based syntax data, for video decoder 300, e.g., in a picture header, a block header, a slice header, or other syntax data, such as a sequence parameter set (SPS), a picture parameter set (PPS), or a video parameter set (VPS). Video decoder 300 may similarly decode such syntax data to determine how to decode corresponding video data.
[0055]
[0073] In this manner, video encoder 200 may generate a bitstream including syntax elements that describe coded video data, e.g., partitions of a picture into blocks (e.g., CUs) and predictive and / or residual information for the blocks. Finally, video decoder 300 may receive the bitstream and decode the coded video data.
[0056]
[0074] Generally, video decoder 300 performs an inverse process to that performed by video encoder 200 to decode encoded video data of a bitstream. For example, video decoder 300 may decode values for syntax elements of a bitstream using CABAC in a manner that is reverse to, but substantially similar to, the CABAC encoding process of video encoder 200. The syntax elements may define partition information for partitioning a picture into CTUs and the partitioning of each CTU according to a corresponding partition structure, such as a QTBT structure, to define CUs of the CTU. The syntax elements may further define prediction and residual information for blocks of video data (e.g., CUs).
[0057]
[0075] The residual information may be represented, for example, by quantized transform coefficients. The video decoder 300 may dequantize and inverse transform the quantized transform coefficients of the block to reconstruct a residual block for the block. The video decoder 300 uses the signaled prediction mode (intra- or inter-prediction) and associated prediction information (e.g., motion information for inter-prediction) to form a predictive block for the block. The video decoder 300 may then combine the predictive 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 block boundaries.
[0058]
[0076] This disclosure may generally refer to “signaling” certain information, such as syntax elements. The term “signaling” may generally refer to communication of values for syntax elements and / or other data used to decode encoded video data. That is, video encoder 200 may signal values for syntax elements in a bitstream. Generally, signaling refers to generating values in a bitstream. As mentioned above, source device 102 may transport the bitstream to destination device 116 in substantially real time or may transport the bitstream to destination device 116 in non-real time, such as may be done when storing syntax elements to storage device 112 for later retrieval by destination device 116.
[0059]
[0077] In video coding standards such as the H.266 / VVC standard, the ALF is applied to minimize the mean square error between filtered samples and the original samples. The input samples to the ALF may be, for example, the output samples of the SAO. The output samples of the ALF may be stored in a decoded picture buffer (DPB) or output as a viewable picture. The filter shapes for the ALF adopted in the Joint Exploration Model (JEM) software were 5x5, 7x7, and 9x9 diamond shapes. In JEM, the filter shape may be selected and signaled at the picture level. To obtain a better tradeoff between coding efficiency and filter complexity, only the 7x7 diamond shape and the 5x5 diamond shape are supported in VVC for the luma and chroma components, respectively.
[0060]
[0078] 2A shows an exemplary filter 140, which is a 7x7 diamond-shaped filter. FIG. 2B shows an exemplary filter 142, which is a 5x5 diamond-shaped filter. In each of filters 140 and 142, the integer coefficients ci are represented with 7 bits of fractional precision. i The absolute value of is coded by using a zeroth-order exponential-Golomb code, followed by a sign bit for non-zero coefficients. In Figures 2A and 2B, each square corresponds to a luma sample or a chroma sample, and the central square corresponds to the sample currently being filtered. To reduce the overhead of transmitting coefficients and the number of multiplications, the filter shapes in Figures 2A and 2B are point-symmetric. In addition, as shown in equation (1), the sum of all filter coefficients is set equal to 128, which is a fixed-point representation of 1.0 with 7-bit fractional precision.
[0061]
number
[0062]
[0079] In equation (1), N is the number of coefficients, and N is equal to 13 and 7 for the 7×7 and 5×5 filter shapes, respectively.
[0063]
[0080] In VVC, nonlinearity is introduced into the ALF: when the difference between adjacent sample values and the currently filtered sample value is too large, a simple clipping function is applied to reduce the influence of the adjacent sample value. To filter a sample, the ALF
[0064]
number
[0065] where R(x,y) is the sample value after SAO.
[0066]
[0081] The nonlinear function is, using a clipping function,
[0067]
number
[0068] where j is equal to 0 or 1, and (x i,j ,y i,j ) is the i-th coefficient c i is the filter tap position offset of
[0069]
[0082] In VVC version 1, the coefficient c i The clipping parameter b i is the clipping index d i BD is the internal bit depth.
[0070]
number
[0071]
[0083] For a filter, the number of signaled coefficients and the number of signaled clipping indices are both N-1. Each coefficient is restricted to the range [-128, 127], which is equivalent to [-1.0, 1.0] with 7 bits of fractional precision. Each clipping index di can be 0, 1, 2, or 3 and is signaled by using a 2-bit fixed-length code. To simplify the clipping operation, as in equation (4), the clipping parameter b i The values of may be restricted to only powers of 2. Therefore, as clipping operations, bitwise logic operations may be applied.
[0072]
[0084] The video encoder 200 and the video decoder 300 may be configured to perform sub-block-level filter adaptation. In VVC Version 1, ALF follows the same luma classification framework as ALF in JEM-7.0. To achieve a better tradeoff between coding efficiency and computational complexity, the block size for classification may be increased from 2x2 samples to 4x4 samples. To determine the class index of a 4x4 block, a surrounding window containing 8x8 luma samples is used to derive direction and activity information. In this 8x8 luma sample window, four gradient values of every second sample are first calculated, as shown in Figure 3. Figure 3 shows the subsampled Laplacian values for a 4x4 sub-block 150 for ALF classification. The gradient values of samples marked with dots are calculated. The gradient values of other samples are set to 0.
[0073]
[0085] Figure 4 shows four gradient values for each sample using coordinates (k,l). The dots represent the samples for which the gradients are being calculated. Block 160 indicates the horizontal gradient (H), block 162 indicates the vertical gradient (V), block 164 indicates the 135-degree gradient (D1), and block 166 indicates the 45-degree gradient (D2). H, V, D1, and D2 are derived as follows:
[0074]
number
[0075]
[0086] The variables i and j can represent the coordinates of the top-left sample in a 4x4 block. The sum of the calculated horizontal gradients, g H , the sum of the calculated vertical gradients g V , the calculated total g of 135 degrees gradient D1 , and the calculated sum of the 45-degree slopes g D2 is calculated as follows:
[0076]
number
[0077]
[0087] R H,V The ratio of the maximum horizontal and vertical gradients to the minimum horizontal and vertical gradients, represented by R D1,D2 The ratio of the maximum of the two diagonal gradients, represented by , to the minimum of the two diagonal gradients is calculated as shown in equation (7).
[0078]
number
[0079]
[0088] Then, to derive the directionality D, R H,V and R D1,D2 are compared with each other using two thresholds t1=2 and t2=4.5.
[0080] Step 1: R H,V ≦t1 and R D1,D2 If both ≦t1, then D is set to 0 (texture), otherwise continue with step 2.
[0081] Step 2: R D1,D2 >R H,V If yes, continue with step 3, else continue with step 4.
[0082] Step 3: R D1,D2 If ≦t2, then D is set to 1 (weak diagonal), otherwise D is set to 2 (strong diagonal).
[0083] Step 4: R H,V If ≦t2, D is set to 3 (weak horizontal / vertical); Otherwise, D is set to 4 (strong horizontal / vertical).
[0084]
[0089] The activity value A is calculated as follows:
[0085]
number
[0086]
[0090] Figure 5 shows an example of merging 25 luma classes into 7 merged classes (0 to 6), where each rectangle represents D and
[0087]
number
[0088] The 5x5 grid 170 represents 25 classes, and the numbers in each box of the 5x5 grid 170 represent merged classes from 0 to 6. Each class, i.e., each square of the 5x5 grid 170, can have an index between 0 and 24 inclusive. A is mapped to a range between 0 and 4 inclusive, and the quantized values are
[0089]
number
[0090] Therefore, each 4x4 block is categorized into one of 25 classes as follows:
[0091]
number
[0092]
[0091] The luma filter set includes 25 filters. However, to reduce the number of bits required to represent the filter coefficients while maintaining coding efficiency, different classes may be merged, and the merged classes use the same filter. A merging table is signaled. In the merging table, the filter index for each class is signaled, for example, using a fixed-length code. In the example filter set for Figure 5, seven luma filters are signaled. For each class, the filter index (0 to 6 in this example) is signaled in the ALF_APS.
[0093]
[0092] After determining a filter from the luma filter set based on the class index C of the 4x4 block and the merging table, before filtering the samples of the 4x4 block, a geometric transformation may be applied to the filter depending on the gradient value calculated for the 4x4 block, as shown in Table 1.
[0094] [Table 1]
[0095]
[0093] Figure 6 shows an example of a geometric transformation of filter 140 in Figure 2A. As can be seen in Figure 6, filter 180 corresponds to a diagonal flip of filter 140. Filter 182 corresponds to a vertical flip of filter 140, and filter 184 corresponds to a right rotation of filter 140.
[0096]
[0094] The video encoder 200 and the video decoder 300 may be configured to perform coding tree block-level adaptation. In JEM-7.0, only one luma filter set is applied to all luma CTBs of a slice, and only one chroma filter is applied to all chroma CTBs of a slice. However, there are two potential disadvantages. First, when the statistics between CTBs differ to some extent, using the same filter or filter set for all CTBs of a color component may limit the coding efficiency of ALF, especially for high-resolution sequences and mixed-content video sequences. Second, when deriving a filter for a slice, the filter cannot be calculated until statistics for the entire slice are collected. This multiple-pass coding is not suitable for low-latency applications. To address this issue, one solution is to use statistics from previously coded slices. However, this may result in some performance degradation.
[0097] In addition to luma 4x4 block-level filter adaptation, VVC supports CTB-level filter adaptation. In a slice, different luma CTBs are allowed to use different luma filter sets, and different chroma CTBs can use different chroma filters. CTBs with similar statistics may use the same filter. This CTB-level filter adaptation improves coding efficiency, especially for low-latency applications. In addition, VVC Version 1 allows filters from previously coded pictures to be used for CTBs. This temporal filter reuse mechanism can reduce the overhead of filter coefficient signaling. In VVC Version 1, up to seven signaled luma filter sets and eight signaled chroma filters can be applied to a slice. When no signaled filters exist, one of 16 fixed filter sets can be applied to the luma CTB. When ALF is enabled, the filter set index of either the fixed filter set or the signaled luma filter set is signaled for the luma CTB. The filter index of the signaled chroma filter is signaled for the chroma CTB. By using the signaled filter and the fixed filter from the previously coded picture, in low-latency applications, when encoding the current CTU, the three CTU-level on / off flags and the filter / filter set index can be determined by using only the statistical information of the current CTU. Thus, the coded bitstream for each CTU can be generated on the fly, without waiting for the statistics of the entire picture to be available.
[0098]
[0096] The video encoder 200 and the video decoder 300 may be configured to implement techniques for line buffer reduction. As shown in Figures 2A and 2B, in the vertical direction, the filter shape has 7 taps and 5 taps for the luma and chroma components, respectively. As a result, in the VVC Test Model 2.0 (VTM-2.0), when decoding a row of a CTU, the seven luma lines and four chroma lines of the upper CTU row must be stored in the line buffer for ALF due to the delay of the deblocking filter and the SAO filter. However, the additional line buffer requires a large chip area, especially for high-definition (HD) and ultra-high-definition (UHD) video sequences.
[0099]
[0097] To make ALF hardware-friendly (e.g., by reducing line buffer requirements), the concept of a virtual boundary (VB) may be applied to remove all line buffer overhead for ALF. Considering the deblocking filter and SAO filter in VVC Version 1, the location of the VB is 4 luma samples and 2 chroma samples above the horizontal CTU boundary. When one sample on one side of the VB is filtered, the sample on the other side of the VB may not be utilized, and modified filtering using symmetric sample padding may be applied.
[0100] 7A-7C show examples of symmetric sample padding for luma ALF filtering in ALF VB. In the examples of FIGS. 7A-7C, the square in the center of filter 190 is the position of the current filtered sample, and the bold line is the position of VB (VB192). In FIGS. 7A-7C, the filter tap positions with dashed lines are padded. FIG. 7A shows an example where one filter tap position of filter 190 is above or below VB192. In this example, one filter tap position is padded. FIG. 7B shows an example where four filter tap positions of filter 190 are above or below VB192. In this example, four filter tap positions are padded.
[0101]
[0099] However, as shown in Figure 7C, if the sample is on the nearest row on each side of the VB 192, the 2D filter is equivalent to a horizontal filter. This may introduce visual artifacts. To address this issue, as shown in equation (10), the filter strength can be compensated when the current filtered sample is located on the nearest row on each side of the VB. Comparing equation (10) with equation (2), it can be seen that three more bits are shifted to the right.
[0102]
number
[0103]
[0100] When VB processing is applied, the classification of 4x4 blocks may also be changed. When calculating the class index of a 4x4 block on one side of the VB, the gradients and samples on the other side of the VB may not be used, as shown in Figure 8.
[0104]
[0101] Figure 8 shows an example of ALF 4x4 sub-block classification in ALF VB. When calculating the gradient values of samples adjacent to VB, the samples on the other side of VB cannot be used. Therefore, the boundary samples on the current side are repeatedly extended as shown in Figure 8. That is, the boundary samples on the current side of VB are mirrored to the other side of VB. Since the number of available gradient values is reduced, the activity derivation in equation (8) becomes
[0105]
number
[0106] is rescaled to
[0107]
[0102] Video encoder 200 and video decoder 300 may be configured to perform filter coefficient signaling. In VVC Version 1, ALF coefficients are signaled in ALF adaptation parameter sets (APS). One APS may include one set of luma filters with up to 25 filters, up to eight chroma filters, and up to eight cross-component ALF (CC-ALF) filters. Each set of luma filters supports applying ALF to 25 classes of luma. In VVC Version 1, up to eight ALF_APSs are supported.
[0108]
[0103] Table 2 below shows an example syntax signal table for signaling filter coefficients in accordance with the techniques of this disclosure.
[0109] [Table 2]
[0110]
[0104] This disclosure describes techniques that can further improve the performance of ALF. For example, in VVC, when filtering samples, only one classifier and one filter may be applied. However, this disclosure has described techniques for applying multiple classifiers and filters to capture more local features. This disclosure describes techniques for a framework that uses multiple filters and classifiers to filter samples.
[0111]
[0105] Figure 9 shows an example framework for using multiple fixed filter sets and multiple signaled filter sets to filter reconstructed samples of video data. Video encoder 200 and video decoder 300 may be configured to implement multiple fixed filter sets and multiple signaled filter sets in accordance with the techniques of Figure 9. The techniques of Figures 10-15 are described with respect to video decoder 300, but may also be performed by video encoder 200.
[0112] 9, the video decoder 300 applies a first-stage ALF 400 to the reconstructed samples R(x,y) to determine an intermediate filtered signal R′. The video decoder 300 then applies a second-stage ALF 410 to R′ to determine values for the filtered samples 430.
[0113]
[0107] Aspects of the first stage ALF400 will now be described in more detail. N s and N f represents the number of signaled and fixed (predefined) filter sets that can be applied to a sample. Rs is the input sample to the ALF. F(f,i), i=0...N f −1 represents the i-th fixed filter set. C(f,i), i=0...Nf −1 represents the classifier for the i-th fixed filter set. Through C(f,i), a filter index is calculated for each sample. Based on the filter index, a filter from the fixed filter set F(f,i) is selected to filter that sample. In addition, C(f,i) determines how to apply a geometric transformation to the coefficients. F(s,i), i=0...N s −1 represents the i-th signaled filter set. C(s,i), i=0...N s −1 represents the classifier with the i-th signaled filter set. Through C(s,i), a filter index is calculated for each sample. Based on the filter index, a filter from a fixed filter set F(s,i) is selected to filter that sample. In addition, C(s,i) determines how to apply a geometric transformation to the coefficients.
[0114] For a reconstructed sample R(x,y), by using the reconstructed sample itself and neighboring samples, the video decoder 300 may apply multiple filter sets. Given a filter set (which may be a fixed filter set or a signaled filter set), a classifier may be applied. The classifier determines which filter from the filter set may be applied and how to transpose the filter coefficients. After the first stage, for each filter set and corresponding classifier, an intermediately filtered signal R′ may be generated, for example, as
[0115]
number
[0116] It can be calculated as follows.
[0117]
[0109] The ith filter, i=0...N f +Ns For -1, c i,j is the j-th coefficient of the selected filter from the i-th filter set, Ni is the number of coefficients, and f i,j,k , k=0 or 1 is a function of one adjacent sample and the current sample, for example, f i,j,k can be implemented as a clipping function, as in VVC.
[0118]
number
[0119] (x i,j,k ,y i,j,k ) is the coordinate offset of the adjacent sample relative to the current sample.
[0120] In some examples, the filter shapes of the fixed or signaled filters can be 5x5, 7x7, 9x9, 11x11, and 13x13. Figure 10A shows an example of a filter 510 that is a 5x5 diamond filter shape, and Figure 10B shows an example of a filter 520 that is a 7x7 diamond filter shape. Figure 10C shows an example of a filter 530 that is a 9x9 diamond filter shape, and Figure 10D shows an example of a filter 540 that is an 11x11 diamond filter shape. Figure 10E shows an example of a filter 550 that is a 13x13 diamond filter shape.
[0121] In one example, the video decoder 300 may be configured to determine a classifier C(f / s,i), an activity value, and a direction value based on a 2-D Laplacian / gradient value. The classifier may be applied to each sample or block. When the classifier is applied to a block, all samples in the block have the same class index and the same transpose type. For example, w i can represent the width of the block, and h imay represent the height of the block, and (x, y) may represent the coordinates of the top-left sample of the block.
[0122] For a sample with coordinates (k, l), the four Laplacian (gradient) values, namely the horizontal gradient H, the vertical gradient V, the 135 degree gradient D1, and the 45 degree gradient D2, are given by
[0123]
number
[0124] It can be derived as: (14)
[0113] The video decoder 300
[0125]
number
[0126] By using vertical and horizontal gradients, the activity value A i where a i and b i are the window sizes in the horizontal and vertical directions for the classifier C(f / s,i), respectively.
[0127]
[0114] The video decoder 300 is A i 0 or more M A,i The quantized value may be configured to be in the range of -1 or less.
[0128]
number
[0129] It is expressed as:
[0130]
[0115] The video decoder 300 may be configured to determine the direction using the horizontal gradient H, the vertical gradient V, the 135 degree gradient D1, and the 45 degree gradient D2.
[0131]
[0116] The video decoder 300 calculates the horizontal gradient g as follows: i,H and the vertical gradient g i,V and the two diagonal gradients g i,D1 and g i,D2 The method may be configured to first calculate the values of
[0132]
number
[0133]
[0117] Direction D i To assign σ, video encoder 200 and video decoder 300 may be configured to derive maximum and minimum values of the horizontal and vertical gradients, and maximum and minimum values of the two diagonal gradients, as follows:
[0134]
number
[0135] Then, just like VVC, in direction D i can be derived, and the number of directions M D,i =5. Step 1.
[0136]
number
[0137] and
[0138]
number
[0139] If both iis set to 0 (the block is categorized as a "texture"). Step 2.
[0140]
number
[0141] If so, continue with step 3; otherwise, continue with step 4. Step 3.
[0142]
number
[0143] If D i is set to 2 (the block is categorized as "strong horizontal / vertical"), otherwise D i is set to 1 (the block is categorized as "weak horizontal / vertical"). Step 4.
[0144]
number
[0145] If D i is set to 4 (the block is categorized as "strong diagonal"), otherwise D i is set to 3 (the block is categorized as a "weak diagonal").
[0146]
[0118] In some examples, more directions may be supported.
[0147]
[0119] The video decoder 300 is
[0148]
number
[0149] By comparing the horizontal and vertical edge strengths (ES) with a threshold array (Th), i,HV ) The size of the array of thresholds is denoted by S, and the thresholds are sorted in ascending order. The number of directions is M D,i =(S+1)×(S+2).
[0150] Step 1. m=0, ES i,HV Initialize to =0.
[0151] Step 2. If m is equal to S, stop; otherwise, go to Step 3.
[0152] Step 3.
[0153]
number
[0154] If m=m+1, ES i,HV =ES i,HV +1 and go to step 2, else stop.
[0155]
[0120] The video decoder 300 performs the following diagonal direction (E i,D )
[0156] Step 1. m=0, E i,D Initialize to =0.
[0157] Step 2. If m is equal to S, stop; otherwise, go to Step 3.
[0158] Step 3.
[0159]
number
[0160] If m=m+1, E i,D =E i,D +1 and go to step 2, else stop.
[0161] An example array of thresholds is Th=[1.25,1.5,2,3,4.5,8] and S=6.
[0162]
[0122] The video decoder 300 calculates the main edge strength (ES M ) and secondary edge strength (ES S ) may be configured to determine
[0163]
number
[0164] If ES M ES HV It is set as ES S ES D otherwise, ES M ES D It is set as ES S ES HV is set as
[0165] ES S But, ES M If it is greater than D i is set to 0. Otherwise,
[0166]
number
[0167] If D i =ES M ×(ES M +1) / 2+ES S otherwise, D i =ES M ×(ES M +1) / 2+ES S +MD,i / 2.
[0168]
[0123] The video decoder 300 uses the class index C i of,
[0169]
number
[0170] It can be configured to derive it as:
[0171]
[0124] C i Based on this, video encoder 200 and video decoder 300 may be configured to select a filter from filter set F(f / s,i).
[0172] Aspects of the second-stage ALF 410 will now be described in more detail. In the second-stage ALF 410, F′ is a filter set and C′ is a corresponding classifier. An intermediate filtering result may be further filtered using the current sample and its neighboring samples. C′ may be used to determine which filter in F′ to apply and how to transpose the coefficients. In one example, F′ may be a signaled filter set or a fixed (predefined) filter set. In one example, C′ may use Rs and / or R′s to determine a filter index for filter set F′ by calculating activity and direction in the same way as the first stage. When applying F′, a transposition may be applied.
[0173]
[0126] A fixed filter set F(f,i) and corresponding classifier C(f,i) may be selected from one or more candidate fixed filter sets. In one example, given i, there may be several candidate fixed filter sets for the fixed filter set F(f,i) and classifier C(f,i). Also, the fixed filter set F(f,i) and classifier C(f,i) may be selected based on the picture / CTU / CU / PU / TU size, the quantization parameter (QP), the number of non-zero quantized coefficients, the motion vector, and the window size (a i ,b i ) may be selected based on coding information such as F(f, i). In some examples, a syntax element may be signaled to indicate which fixed filter set is used from the candidate fixed filter sets for the i-th fixed filter set for each F(f, i). The syntax element may be signaled as part of an SPS, PPS, VPS, APS, picture header (PH), slice header (SH), sub-picture, CTU, or block. In some examples, all these syntax elements may have the same value, and only one syntax element needs to be signaled. In some examples, only one candidate fixed filter set may be available for F(f, i), and therefore no syntax element needs to be signaled.
[0174] In one example, N s and N f may be implicitly determined or explicitly signaled at a higher level, such as the SPS, VPS, APS, PH, SH, CTU, or sub-block level.
[0175] Video decoder 300 may be configured to implement multiple fixed filters and one signaled filter. In another example, to reduce bitstream signaling overhead while maintaining adaptability, video encoder 200 and video decoder 300 may be configured to filter the current sample using only one signaled filter along with multiple fixed filters, as shown in FIG.
[0176]
[0129] Figure 11 shows an exemplary framework for implementing multiple fixed filters with one signaled filter in accordance with the techniques of this disclosure. In the example of Figure 11, video encoder 200 and video decoder 300 apply a first-stage ALF 540 to reconstructed samples R(x,y) of a reconstructed block. To apply the first-stage ALF 540, video encoder 200 and video decoder 300 apply a classifier (C) to determine a first class index for the reconstructed samples and select a filter (f) from a first set of filters (F) based on the first class index. Video encoder 200 and video decoder 300 apply a filter from the first set of filters to the reconstructed samples to determine a first intermediate sample value (R'). As shown in Figure 11, in the first stage 540, video encoder 200 and video decoder 300 may use multiple classifiers and multiple filters to determine multiple intermediate sample values.
[0177]
[0130] Video encoder 200 and video decoder 300 apply the second-stage ALF 542 to the reconstructed samples. Equation (28) below shows an example of how video encoder 200 and video decoder 300 may apply the second-stage ALF.
[0178]
[0131] N frepresents the number of fixed (predefined) filter sets that can be applied to the samples. Rs is the input to the ALF: F(f,i), i=0...N f -1 represents the i-th fixed filter set, C(f,i), i=0...N f −1 represents the classifier with the i-th fixed filter set. Through C(f,i), a filter index is calculated for each sample. Based on the filter index, a filter from the fixed filter set F(f,i) is selected to filter that sample. In addition, C(f,i) determines how to apply a geometric transformation to the coefficients.
[0179] The first stage will now be described. In the first stage, for a reconstructed sample R(x,y), the video encoder 200 and the video decoder 300 may be configured to apply multiple fixed filter sets by using the reconstructed sample itself and neighboring samples. Given a fixed filter set F(f,i), the video encoder 200 and the video decoder 300 may apply a classifier C(f,i). Based on the derived class index, the video encoder 200 and the video decoder 300 may apply a filter from the filter set F(f,i). In addition, a geometric transformation may be determined in C(f,i), and the geometric transformation may be applied to the coefficients of the selected filter. After the first stage, for each filter set and corresponding classifier, the video encoder 200 and the video decoder 300 may calculate an intermediate filtered signal R′, for example, as follows:
[0180]
number
[0181]
[0133] The ith filter, i=0...N f For -1, c i,j is the j-th coefficient of the filter selected from the i-th filter set F(f,i), and Ni is the number of coefficients, and f i,j,k , k=0 or 1 is a function of one adjacent sample and the current sample, for example, f i,j,k can be implemented as a clipping function, as in VVC.
[0182]
number
[0183] (x i,j,k ,y i,j,k ) is the coordinate offset of the adjacent sample relative to the current sample, and b i,j is the j-th clipping parameter of the filter selected from the i-th filter set.
[0184] In some examples, the filter shapes of the fixed or signaled filters may be 5x5, 7x7, 9x9, 11x11, and 13x13, as shown in FIG.
[0185] In one example, the video encoder 200 and the video decoder 300 may determine an activity value and a direction value based on the 2-D Laplacian value in a classifier C(f,i). The classifier may be applied to each sample or block. When the classifier is applied to a block, all samples in the block have the same class index and the same transpose type. For example, w i can represent the width of the block, and h i may represent the height of the block, and (x, y) may represent the coordinates of the top-left sample of the block.
[0186]
[0136] For a sample having coordinates (k, l), the video encoder 200 and the video decoder 300 may be configured to derive four Laplacian (gradient) values, namely, a horizontal gradient H, a vertical gradient V, a 135 degree gradient D1, and a 45 degree gradient D2, as follows:
[0187]
number
[0188]
[0137] Video encoder 200 and video decoder 300 calculate activity value A by using vertical and horizontal gradients as follows: i can be derived.
[0189]
number
[0190] where a i and b i are the window sizes in the horizontal and vertical directions for the classifier C(f,i), respectively.
[0191]
[0138] The video encoder 200 and the video decoder 300 are i 0 or more M A,i The quantized value may be configured to be in the range of -1 or less,
[0192]
number
[0193] It is expressed as:
[0194]
[0139] In one example,
[0195]
number
[0196] bitdepth is the bit depth of R(x,y), and multiply i is the window size (a i ,b i ) may depend on multiple i can be equal to the following values:
[0197] [Table 3]
[0198]
[0140] Video encoder 200 and video decoder 300 may be configured to determine the direction by using a horizontal gradient H, a vertical gradient V, a 135 degree gradient D1, and a 45 degree gradient D2.
[0199]
[0141] The video encoder 200 and the video decoder 300 calculate the horizontal gradient g as follows: i,H and the vertical gradient g i,V and the two diagonal gradients g i,D1 and g i,D2 The method may be configured to first calculate the values of
[0200]
number
[0201]
[0142] Direction D i To assign σ, video encoder 200 and video decoder 300 may be configured to derive maximum and minimum values of the horizontal and vertical gradients, and maximum and minimum values of the two diagonal gradients, as follows:
[0202]
number
[0203]
[0143] Then, the video encoder 200 and the video decoder 300 calculate the direction D i and the number of directions M D,i =5. Step 1.
[0204]
number
[0205] and
[0206]
number
[0207] If both i is set to 0 (the block is categorized as a "texture"). Step 2.
[0208]
number
[0209] If so, continue with step 3; otherwise, continue with step 4. Step 3.
[0210]
number
[0211] If D i is set to 2 (the block is categorized as "strong horizontal / vertical"), otherwise D i is set to 1 (the block is categorized as "weak horizontal / vertical"). Step 4.
[0212]
number
[0213] If D i is set to 4 (the block is categorized as "strong diagonal"), otherwise D i is set to 3 (the block is categorized as a "weak diagonal").
[0214]
[0144] In some examples, more directions may be supported.
[0215]
[0145] The video encoder 200 and the video decoder 300 are
[0216]
number
[0217] By comparing the horizontal and vertical edge strengths (ES) with a threshold array (Th), i,HV ) The size of the array of thresholds may be S, and the thresholds may be sorted in ascending order. The number of directions may be M D,i =(S+1)×(S+2).
[0218] Step 1. m=0, ES i,HV Initialize to =0.
[0219] Step 2. If m is equal to S, stop; otherwise, go to Step 3.
[0220] Step 3.
[0221]
number
[0222] If m=m+1, ES i,HV =ES i,HV +1 and go to step 2, else stop.
[0223]
[0146] The video encoder 200 and the video decoder 300 perform the following diagonal (E i,D )
[0224] Step 1. m=0, E i,D Initialize to =0.
[0225] Step 2. If m is equal to S, stop; otherwise, go to Step 3.
[0226] Step 3.
[0227]
number
[0228] If m=m+1, E i,D =E i,D +1 and go to step 2, else stop.
[0229] An example array of thresholds is Th=[1.25,1.5,2,3,4.5,8] and S=6.
[0230]
[0148] The video encoder 200 and the video decoder 300 calculate the main edge strength (ES M ) and secondary edge strength (ES S ) may be configured to determine
[0231]
number
[0232] If ES M ES HV ES S ES D otherwise, ES M ES D ES S ES HV is set as
[0233] ES S But, ES M If it is greater than D i is set to 0. Otherwise,
[0234]
number
[0235] If D i =ES M ×(ES M +1) / 2+ES S otherwise, D i =ES M ×(ES M +1) / 2+ES S +M D,i / 2.
[0236] Class Index C i teeth,
[0237]
number
[0238] It can be derived as:
[0239] C i Based on this, a filter from C(f,i) is selected.
[0240]
[0149] The video encoder 200 and the video decoder 300 may select a fixed filter set F(f,i) and a corresponding classifier C(f,i) from one or more candidate fixed filter sets. In one example, given i, there may be several candidate fixed filter sets for the fixed filter set F(f,i) and the classifier C(f,i). Also, the fixed filter set F(f,i) and the classifier C(f,i) may be determined based on the picture / CTU / CU / PU / TU size, QP, the number of non-zero quantized coefficients, the motion vector, and the window size (a i ,b i) may be selected based on coding information such as F(f, i). In some examples, a syntax element may be signaled to indicate, for each F(f, i), which fixed filter set is used from the candidate fixed filter sets for the i-th fixed filter set. The syntax element may be signaled at the SPS, PPS, VPS, APS, PH, SH, sub-picture, CTU, or block level. In some examples, all these syntax elements may have the same value, and only one syntax element needs to be signaled. In some examples, the candidate fixed filter sets may have only one fixed filter set, and therefore, no syntax element needs to be signaled.
[0241] In one example, the window size (a i ,b i ), the number of all available fixed filters is T. For example, QP can represent the quantization parameter of the current sample, and QP_MIN, QP_MAX, and QP_OFFSET are predefined values. The indices of two candidate fixed filter sets are
[0242]
number
[0243] A syntax element may be signaled to indicate whether the l0th candidate fixed filter set or the l1th candidate fixed filter set is used for F(f,i). In some examples, all fixed filter sets may share the same syntax element.
[0244] Aspects of the second stage will now be described. In the second stage, F' is a signaled filter or a predefined filter set, and C' is a corresponding classifier. The intermediate filtering result may be further filtered using the current sample and / or its neighboring samples. C' may be used to determine which filter in F' to apply and how to transpose the coefficients. As in the first stage, C' may use Rs and / or R's to determine the filter index for the filter set F' by calculating the activity and direction. When applying F', transposition may be applied.
[0245] In one example, for a sample with coordinates (k, l), four Laplacian (gradient) values, namely, horizontal gradient H, vertical gradient V, 135 degree gradient D1, and 45 degree gradient D2, are given by
[0246]
number
[0247] It can be derived as:
[0248] Video encoder 200 and video decoder 300 may be configured to derive activity value A by using vertical and horizontal gradients, as follows:
[0249]
number
[0250] where a and b are the horizontal and vertical window sizes for classifier C', respectively, and w and h are the width and height of the block in which all samples have the same classification index and the same transposition index.
[0251]
[0154] The video encoder 200 and the video decoder 300 set A to a value greater than or equal to 0 and less than or equal to M. A The quantized value may be configured to be in the range of -1 or less,
[0252]
number
[0253] For example,
[0254]
number
[0255] bitdepth is the bit depth of R(x,y), mult may depend on the window size a×b, and mult may be equal to the following value:
[0256] [Table 4]
[0257]
[0155] The direction and how to perform the transposition may be calculated in the manner described in U.S. Patent Publication No. 2017 / 0238020A1, U.S. Patent Publication No. 2017 / 0237981A1, or U.S. Patent Publication No. 2017 / 0237982A1, all of which are incorporated herein by reference.
[0258] Further aspects of filtering will now be described. After obtaining the class index of the sample from C′, the video encoder 200 and the video decoder 300 may be configured to select a filter from the filter set F′ based on the class index.
[0259]
number
[0260] The filter may be configured to apply a filter such as:
[0261] In (28), the filtering is divided into two parts. Filter part 1:
[0262]
number
[0263] : By using neighboring samples, a geometric transformation can be applied to filter, where N is the number of coefficients of the filter shape to be applied. The filter can be a 5x5, 7x7, 9x9, 11x11, or 13x13 diamond filter, as shown in Figure 9. Filter part 2:
[0264]
number
[0265] : Filtering and geometric transformations can be applied by using intermediate filtered samples. N0 and N1 represent the number of potentially unique coefficients.
[0266] Function f i,j , j=0 or 1,
[0267]
number
[0268] It can be defined using a clipping function such as:
[0269] Function g i teeth,
[0270]
number
[0271] It can be defined using a clipping function such as:
[0272] b i is the coefficient c i is the clipping parameter corresponding to
[0273]
[0157] Figures 12A-12E show examples of two-part filters. Figure 12A shows an example where filter part 1 (filter 560) is 5x5, N1 = 7, and for filter part 2 (filter 562), N1 = 2. Figure 12B shows an example where filter part 1 (filter 564) is 7x7, N0 = 13, and for filter part 2 (filter 566), N1 = 2. Figure 12C shows an example where filter part 1 (filter 568) is 9x9, N1 = 21, and for filter part 2 (filter 570), N1 = 2. Figure 12D shows an example where filter part 1 (filter 572) is 11x11, N1 = 31, and for filter part 2 (filter 574), N1 = 2. FIG. 12E shows an example where filter portion 1 (filter 576) is 13×13 N1=43, and for filter portion 2 (filter 578) N1=2.
[0274]
[0158] In some examples, the values of N0 and / or N1 may be explicitly signaled or implicitly determined at the SPS, VPS, PPS, APS, PH, SH, sub-picture header, or block level.
[0275] In some examples, the flag is explicitly signaled, or when this flag is equal to one value, all coefficients c i , i=0...N0-1, and the clipping parameter b i, i=0...N0-1 may not necessarily be signaled / used and may be implicitly determined at the SPS, VPS, PPS, APS, PH, SH, sub-picture header, block level, or filter level, so that it is inferred to be 0.
[0276] In some examples, the flag is explicitly signaled, or when this flag is equal to one value, all coefficients c i , i=N0...N0+N1-1, and the clipping parameter b i , i=N0...N0+N1-1 may not necessarily be signaled / used and may be implicitly determined at the SPS, VPS, PPS, APS, PH, SH, sub-picture header, block level, or filter level, so that it is inferred to be 0.
[0277]
[0161] In one filter set, the value of N0 may be different for each filter. In one filter set, the value of N1 may be different for each filter.
[0278]
[0162] The present disclosure recognizes that ALF performance can be improved over the techniques described in JVET-U0100 and U.S. Provisional Patent Application No. 63 / 130,275. When only filtered samples from the first stage are preferred and no filtering in the second stage is required, the filter coefficients c of F' can be i , i=0...N0-2 are still signaled, and they are all zero. However, it is not necessary to signal all these zero coefficients. Therefore, to improve coding efficiency, an alternative signaling process can be applied.
[0279] In some examples, the video encoder 200 and the video decoder 300 may be configured to code data representing one or more filters F(f,i) into the bitstream, rather than using only fixed filters. Additionally, or alternatively, the video encoder 200 and the video decoder 300 may be configured to determine whether to perform a second stage of filtering as discussed above. When the second stage is not performed, the video encoder 200 and the video decoder 300 may avoid coding (encoding and / or decoding) coefficients for one or more filters applied during the second stage, which may reduce signaling overhead in the bitstream and processing performed by both the video encoder 200 and the video decoder 300.
[0280] FIG. 13 is a conceptual diagram illustrating an example ALF framework in accordance with the techniques of this disclosure. A video decoder 300 may be configured to perform the techniques described with respect to FIG. 3. As shown in FIG. 13, the example ALF framework includes both a first stage 580 and a second stage 582. According to the techniques of this disclosure, the video encoder 200 and the video decoder 300 may use filter usage information to determine whether the second stage should be performed. When the second stage should not be performed, the video encoder 200 and the video decoder 300 may bypass the filtering (C', F') in the second stage, as shown in FIG. 13. Thus, the video encoder 200 and the video decoder 300 use the intermediate filtered samples (R'(x,y,0)...R'(x,y,N)) from the first stage to calculate the filtered samples. f -1)) can be used.
[0281]
[0165] Furthermore, the video decoder 300 may, for example,
[0282]
number
[0283] where w i is the weight of R'(x,y,i).
[0284] In some examples, filter usage information may be signaled at the sequence, picture, slice, sub-picture, CTU, CTB, or sub-block level. For example, video encoder 200 and video decoder 300 may code filter usage information in one or more of a sequence parameter set (SPS), a picture parameter set (PPS), a slice header, a sub-picture header, a coding tree unit (CTU) header, a coding tree block (CTB) header, or a sub-block header.
[0285] In another example, the filter usage information may not be signaled. Instead, the video decoder 300 may adaptively derive the filter usage information based on coding information, such as the quantization parameter (QP), block size, inter / intra mode, or other such data.
[0286]
[0168] Weight w i , i=0...N f The weight w may be fixed at −1 given the value of the filter usage information, or video encoder 200 and video decoder 300 may code a value for the weight in the bitstream at the sequence, picture, slice, sub-picture, CTU, CTB, or sub-block level. i Several combinations of may be used, and the filter usage information may be used to determine which combination of weights to use for the current sample.
[0287] In one example, a first flag may be signaled. When this first flag is equal to 1, video encoder 200 and video decoder 300 may bypass the value (C′, F′). Then, a second flag may be signaled. Video encoder 200 and video decoder 300 may assign the value of the second flag to a weight w i , i=0...N f For example, the second flag may be associated with a combination of i, where i is 0...N. f When it can be −1, R′(x,y,i) can be used as the filtered sample.
[0288]
[0170] Figure 14 is a conceptual diagram illustrating another example ALF framework in accordance with the techniques of this disclosure. Video encoder 200 and video decoder 300 may be configured in accordance with the techniques described with respect to Figure 14. In particular, in Figure 14, scaling may be applied to the filtering results to obtain filtered samples.
[0289]
[0171] Figure 14 shows an example framework for using multiple fixed filter sets and multiple signaled filter sets to filter reconstructed samples of video data. A video decoder 300 may be configured to implement multiple fixed filters and multiple signaled filters in accordance with the technique of Figure 14. In the example of Figure 14, the video decoder 300 applies a first stage ALF 584 to the reconstructed samples R(x,y) to determine an intermediate filtered signal R'. The video decoder 300 then applies a second ALF stage 586 to R' to determine values for filtered samples 588.
[0290] 15 is a block diagram illustrating an example video encoder 200 that may perform the techniques of this disclosure. FIG. 15 is provided for illustrative purposes and should not be considered limiting of the techniques as broadly illustrated and described in this disclosure. For illustrative purposes, this disclosure describes video encoder 200 in accordance with VVC (ITU-T H.266, under development) and HEVC (ITU-T H.265) techniques. However, the techniques of this disclosure may be performed by video encoding devices configured for other video coding standards.
[0291] 15, the video encoder 200 includes a video data memory 230, a mode selection unit 202, a residual generation unit 204, a transform processing unit 206, a quantization unit 208, an inverse quantization unit 210, an inverse transform processing unit 212, a reconstruction unit 214, a filter unit 216, a DPB 218, and an entropy coding unit 220. Any or all of the video data memory 230, the mode selection unit 202, the residual generation unit 204, the transform processing unit 206, the quantization unit 208, the inverse quantization unit 210, the inverse transform processing unit 212, the reconstruction unit 214, the filter unit 216, the DPB 218, and the entropy coding unit 220 may be implemented in one or more processors or processing circuits. For example, the units of 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. Moreover, video encoder 200 may include additional or alternative processors or processing circuits for performing these and other functions.
[0292]
[0174] Video data memory 230 may store video data to be encoded by components of video encoder 200. Video encoder 200 may receive video data stored in video data memory 230, for example, from video source 104 (FIG. 1). DPB 218 may serve as a reference picture memory that stores reference video data for use in predicting subsequent video data by video encoder 200. Video data memory 230 and DPB 218 may be formed by any of a variety of memory devices, such as synchronous dynamic random access memory (DRAM), including DRAM (SDRAM), magnetoresistive RAM (MRAM), resistive RAM (RRAM), or other types of memory devices. Video data memory 230 and DPB 218 may be provided by the same memory device or separate memory devices. In various examples, video data memory 230 may be on-chip with other components of video encoder 200, as shown, or off-chip relative to those components.
[0293] In this disclosure, references to video data memory 230 should not be construed as limited to memory internal to video encoder 200 unless specifically so described, nor should they be construed as limited to memory external to video encoder 200 unless specifically so described. Instead, references to video data memory 230 should be understood as a reference memory that stores video data that video encoder 200 receives for encoding (e.g., video data for a current block to be encoded). Memory 106 of FIG. 1 may also provide temporary storage of outputs from various units of video encoder 200.
[0294] The various units in FIG. 15 are shown to aid in understanding the operations performed by video encoder 200. The units may be implemented as fixed-function circuits, programmable circuits, or a combination thereof. A fixed-function circuit refers to a circuit that provides a specific function and is preset with respect to the operations that can be performed. A programmable circuit refers to a circuit that can be programmed to perform various tasks and to provide flexible functionality in the operations that can be performed. For example, a programmable circuit may execute software or firmware that causes the programmable circuit to operate in a manner defined by the software or firmware instructions. A fixed-function circuit may execute software instructions (e.g., to receive parameters or output parameters), but the types of operations that the fixed-function circuit performs are generally invariant. In some examples, one or more of the units may be separate circuit blocks (fixed function or programmable), and in some examples, one or more of the units may be integrated circuits.
[0295]
[0177] Video encoder 200 may include an arithmetic logic unit (ALU), a basic functional unit (EFU), a programmable core formed from digital circuits, analog circuits, and / or programmable circuits. In examples in which the operations of video encoder 200 are implemented using software executed by programmable circuits, memory 106 (FIG. 1) may store instructions (e.g., object code) of the software that video encoder 200 receives and executes, or another memory (not shown) within video encoder 200 may store such instructions.
[0296]
[0178] The video data memory 230 is configured to store received video data. The video encoder 200 may retrieve pictures 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.
[0297] The mode select unit 202 includes a motion estimation unit 222, a motion compensation unit 224, and an intra prediction unit 226. The mode select unit 202 may include additional functional units for performing video prediction according to other prediction modes. By way of example, the mode select 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, etc.
[0298] The mode selection unit 202 generally coordinates multiple encoding passes to test combinations of encoding parameters and the resulting rate-distortion values for such combinations. The encoding parameters may include partitioning of CTUs into CUs, prediction modes for CUs, transform types for residual data of CUs, quantization parameters for residual data of CUs, etc. The mode selection unit 202 may finally select a combination of encoding parameters that has a rate-distortion value that is better than other tested combinations.
[0299] Video encoder 200 may partition a picture retrieved from video data memory 230 into a series of CTUs, encapsulating one or more CTUs in a slice. Mode select unit 202 may partition the CTUs of the picture according to a tree structure, such as the QTBT structure or quadtree structure of HEVC described above. As described above, video encoder 200 may form one or more CUs from partitioning the CTUs according to the tree structure. Such CUs may also be generally referred to as “video blocks” or “blocks.”
[0300] Generally, the mode selection unit 202 also controls its components (e.g., the motion estimation unit 222, the motion compensation unit 224, and the intra prediction unit 226) to generate a prediction block for a current block (e.g., a current CU, or in HEVC, an overlapping portion of a PU and a TU). For inter prediction of the current block, the motion estimation unit 222 may perform motion search to identify one or more closely matching reference blocks in one or more reference pictures (e.g., one or more previously coded pictures stored in the DPB 218). In particular, the motion estimation unit 222 may calculate a value representing how similar a potential reference block is to the current block according to, for example, a sum of absolute differences (SAD), a sum of squared differences (SSD), a mean absolute difference (MAD), a 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 block under consideration. Motion estimation unit 222 may identify the reference block with the lowest value resulting from these calculations, which indicates the reference block that most closely matches the current block.
[0301] 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 a 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 unidirectional inter prediction, the motion estimation unit 222 may provide a single motion vector, while in bidirectional inter prediction, the motion estimation unit 222 may provide two motion vectors. The motion compensation unit 224 may then generate a predictive block using the motion vectors. For example, the motion compensation unit 224 may use the motion vectors to retrieve data of the reference block. As another example, if the motion vectors have sub-sample precision, the motion compensation unit 224 may interpolate values for the predictive block according to one or more interpolation filters. Moreover, in bidirectional inter prediction, the motion compensation unit 224 may retrieve data for the two reference blocks identified by the respective motion vectors and combine the retrieved data, for example, through sample-wise averaging or weighted averaging.
[0302] As another example, for intra prediction, or intra-predictive coding, intra prediction unit 226 may generate a predictive block from samples neighboring a current block. For example, in a directional mode, intra prediction unit 226 may generally mathematically combine values of neighboring samples and populate these calculated values in a defined direction across the current block to generate a predictive block. As another example, in a DC mode, intra prediction unit 226 may calculate an average of neighboring samples for the current block and generate a predictive block to include this resulting average for each sample of the predictive block.
[0303] The mode select unit 202 provides the prediction block to the residual generation unit 204. The residual generation unit 204 receives a raw, uncoded version of the current block from the video data memory 230 and receives the prediction block from the mode select unit 202. The residual generation unit 204 calculates sample-by-sample differences between the current block and the prediction block. The resulting sample-by-sample differences define a residual block for the current block. In some examples, the residual generation unit 204 may also determine differences between sample values in the residual block to generate the residual block using residual differential 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.
[0304] In examples in which the mode select unit 202 partitions CUs into PUs, each PU may be associated with a luma prediction unit and a corresponding chroma prediction unit. The video encoder 200 and the video decoder 300 may support PUs having various sizes. As indicated above, the size of a CU may refer to the size of the luma coding block of the CU, and the size of a PU may refer to the size of the luma prediction unit of the PU. Assuming that the size of a particular CU is 2N×2N, the video encoder 200 may support a PU size of 2N×2N or N×N for intra prediction and a symmetric PU size of 2N×2N, 2N×N, N×2N, N×N, or the like for inter prediction. The video encoder 200 and the video decoder 300 may also support asymmetric partitioning of PU sizes of 2N×nU, 2N×nD, nL×2N, and nR×2N for inter prediction.
[0305] In examples where the mode select unit 202 does not further partition CUs into PUs, each CU may be associated with a luma coding block and a corresponding chroma coding block. As described above, the size of a CU may refer to the size of the luma coding block of the CU. The video encoder 200 and the video decoder 300 may support CU sizes of 2N×2N, 2N×N, or N×2N.
[0306] In other video coding techniques, such as intra block copy mode coding, affine mode coding, and linear model (LM) mode coding, for example, mode select unit 202 generates a predictive block for the current block being coded via a respective unit associated with the coding technique. In some examples, such as palette mode coding, mode select unit 202 may not generate a predictive block, but instead generate syntax elements that indicate how the block should be reconstructed based on a selected palette. In such modes, mode select unit 202 may provide these syntax elements to be coded to entropy coding unit 220.
[0307]
[0189] As described above, the residual generation unit 204 receives video data for a current block and a corresponding predictive 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 sample-by-sample differences between the predictive block and the current block.
[0308] Transform processing unit 206 applies one or more transforms to the residual block to generate a block of transform coefficients (referred to herein as a "transform coefficient block"). Transform processing unit 206 may apply various transforms to the residual block to form the transform coefficient block. For example, transform processing unit 206 may apply a discrete cosine transform (DCT), a directional transform, a Karhunen-Loeve transform (KLT), or a conceptually similar transform to the residual block. In some examples, transform processing unit 206 may perform multiple transforms on the residual block, e.g., a linear transform and a quadratic transform such as a rotation transform. In some examples, transform processing unit 206 does not apply a transform to the residual block.
[0309] The quantization unit 208 may quantize the transform coefficients in the transform coefficient block to generate a quantized transform coefficient block. The quantization unit 208 may quantize the transform coefficients of the transform coefficient block according to a quantization parameter (QP) value associated with the current block. The video encoder 200 (e.g., via the mode selection unit 202) may adjust the degree of quantization applied to the transform coefficient block associated with the current block by adjusting the QP value associated with the CU. Quantization may result in a loss of information, and therefore, the quantized transform coefficients may have lower precision than the original transform coefficients generated by the transform processing unit 206.
[0310]
[0192] The inverse quantization unit 210 and the inverse transform processing unit 212 may apply inverse quantization and inverse transform to the quantized transform coefficient block, respectively, to reconstruct a residual block from the transform coefficient block. The reconstruction unit 214 may generate a reconstructed block corresponding to the current block (potentially with some distortion) based on the reconstructed residual block and the predictive block generated by the mode select unit 202. For example, the reconstruction unit 214 may add samples of the reconstructed residual block to corresponding samples from the predictive block generated by the mode select unit 202 to generate the reconstructed block.
[0311]
[0193] Filter unit 216 may perform one or more filter operations on the reconstructed block. For example, filter unit 216 may perform a deblocking operation to reduce blockiness artifacts along the edges of a CU. The operations of filter unit 216 may be skipped in some examples.
[0312] The video encoder 200 stores the reconstructed blocks in the DPB 218. For example, in examples where the operations of the filter unit 216 are not performed, the reconstruction unit 214 may store the reconstructed blocks in the DPB 218. In examples where the operations of the filter unit 216 are performed, the filter unit 216 may store the filtered reconstructed blocks in the DPB 218. The motion estimation unit 222 and the motion compensation unit 224 may retrieve reference pictures formed from the reconstructed (and potentially filtered) blocks from the DPB 218 to inter-predict blocks of a later-encoded picture. Furthermore, the intra-prediction unit 226 may use the reconstructed blocks in the DPB 218 of the current picture to intra-predict other blocks in the current picture.
[0313] Generally, the entropy encoding unit 220 may entropy encode syntax elements received from other functional components of the video encoder 200. For example, the entropy encoding unit 220 may entropy encode quantized transform coefficient blocks from the quantization unit 208. As another example, the entropy encoding unit 220 may entropy encode predictive syntax elements (e.g., motion information for inter-prediction or intra-mode information for intra-prediction) from the mode select unit 202. The entropy encoding unit 220 may perform one or more entropy encoding operations on the syntax elements, which are another example of video data, to generate entropy-encoded data. For example, entropy encoding unit 220 may perform a context-adaptive variable length coding (CAVLC) operation, a CABAC operation, a variable-to-variable (V2V) length coding operation, a syntax-based context-adaptive binary arithmetic coding (SBAC) operation, a probability interval partitioned entropy (PIPE) coding operation, an exponential-Golomb coding operation, or another type of entropy coding operation on the data. In some examples, entropy encoding unit 220 may operate in a bypass mode in which syntax elements are not entropy coded.
[0314]
[0196] Video encoder 200 may output a bitstream that includes entropy coding syntax elements needed to reconstruct blocks of a slice or picture. In particular, entropy coding unit 220 may output the bitstream.
[0315]
[0197] The operations described above are described with respect to blocks. Such descriptions should be understood as operations for luma coding blocks and / or chroma coding blocks. As described above, in some examples, the luma coding blocks and chroma coding blocks are luma and chroma components of a CU. In some examples, the luma coding blocks and chroma coding blocks are luma and chroma components of a PU.
[0316] In some examples, operations performed with respect to luma coding blocks do not need to be repeated for chroma coding blocks. As an example, operations for identifying motion vectors (MVs) and reference pictures for luma coding blocks do not need to be repeated to identify MVs and reference pictures for chroma blocks. Rather, MVs for luma coding blocks may be scaled to determine MVs for chroma blocks, and the reference pictures may be the same. As another example, the intra prediction process may be the same for luma coding blocks and chroma coding blocks.
[0317] 16 is a block diagram illustrating an example video decoder 300 that may implement the techniques of this disclosure. Figure 16 is provided for illustrative purposes and is not intended to limit the techniques broadly illustrated and described in this disclosure. For illustrative purposes, this disclosure describes a video decoder 300 in accordance with VVC (ITU-T H.266, under development) and HEVC (ITU-T H.265) techniques. However, the techniques of this disclosure may be implemented by video coding devices configured for other video coding standards.
[0318] In the example of FIG. 16, 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 transform processing unit 308, a reconstruction unit 310, a filter unit 312, and a DPB 314. Any or all of the CPB memory 320, the entropy decoding unit 302, the prediction processing unit 304, the inverse quantization unit 306, the inverse transform processing unit 308, the reconstruction unit 310, the filter unit 312, and the 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. Moreover, the video decoder 300 may include additional or alternative processors or processing circuits for performing these and other functions.
[0319] 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 prediction according to other prediction modes. By way of example, the prediction processing unit 304 may include a palette unit, an intra block copy unit (which may form part of the motion compensation unit 316), an affine unit, a linear model (LM) unit, etc. In other examples, the video decoder 300 may include more, fewer, or different functional components.
[0320]
[0202] The CPB memory 320 may store video data, such as an encoded video bitstream, to be decoded by components of the video decoder 300. The video data stored in the CPB memory 320 may be obtained, for example, from the computer-readable medium 110 (FIG. 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 coded pictures, such as temporary data representing output from various units of the video decoder 300. The DPB 314 generally stores decoded pictures that the video decoder 300 may output and / or use as reference video data when decoding subsequent data or pictures of the encoded video bitstream. The CPB memory 320 and the DPB 314 may be formed by any of a variety of memory devices, such as DRAM, including SDRAM, MRAM, RRAM, or other types of memory devices. The CPB memory 320 and the DPB 314 may be provided by the same memory device or separate memory devices. In various examples, the CPB memory 320 may be on-chip with other components of the video decoder 300 or off-chip relative to those components.
[0321] Additionally or alternatively, in some examples, video decoder 300 may retrieve coded video data from memory 120 (FIG. 1). That is, memory 120 may store data as described above in conjunction with CPB memory 320. Similarly, memory 120 may store instructions to be executed by video decoder 300 when some or all of the functionality of video decoder 300 is implemented in software to be executed by processing circuitry of video decoder 300.
[0322] The various units shown in FIG. 16 are presented to aid in understanding the operations performed by video decoder 300. The units may be implemented as fixed-function circuits, programmable circuits, or a combination thereof. As with FIG. 15, a fixed-function circuit refers to a circuit that provides a specific function and is preset with respect to the operations that may be performed. A programmable circuit refers to a circuit that may be programmed to perform various tasks and to provide flexible functionality in the operations that may be performed. For example, a programmable circuit may execute software or firmware that causes the programmable circuit to operate in a manner defined by the software or firmware instructions. A fixed-function circuit may execute software instructions (e.g., to receive or output parameters), but the types of operations that the fixed-function circuit performs are generally invariant. In some examples, one or more of the units may be separate circuit blocks (fixed function or programmable), and in some examples, one or more of the units may be an integrated circuit.
[0323]
[0205] The video decoder 300 may include a programmable core formed from an ALU, an EFU, digital circuits, analog circuits, and / or programmable circuits. In examples in which the operations of the video decoder 300 are performed by software executing on programmable circuits, on-chip or off-chip memory may store instructions (e.g., object code) of the software that the video decoder 300 receives and executes.
[0324]
[0206] The entropy decoding unit 302 may receive the encoded video data from the CPB and entropy decode the video data to recover the syntax elements. The prediction processing unit 304, the inverse quantization unit 306, the inverse transform processing unit 308, the reconstruction unit 310, and the filter unit 312 may generate decoded video data based on the syntax elements extracted from the bitstream.
[0325]
[0207] Generally, the video decoder 300 reconstructs a picture on a block-by-block basis. The video decoder 300 may perform a reconstruction operation on each block individually (wherein the block currently being reconstructed, i.e., currently being decoded, may be referred to as the "current block").
[0326] The entropy decoding unit 302 may entropy decode syntax elements defining quantized transform coefficients of a quantized transform coefficient block, as well as transform information such as a quantization parameter (QP) and / or one or more transform mode indications. The inverse quantization unit 306 may use the QP associated with the quantized transform coefficient block to determine the degree of quantization and, similarly, the degree of inverse quantization to apply. The inverse quantization unit 306 may perform, for example, a bitwise left-shift operation to inverse quantize the quantized transform coefficients. The inverse quantization unit 306 may thereby form a transform coefficient block including the transform coefficients.
[0327]
[0209] After the inverse quantization unit 306 forms the transform coefficient blocks, the inverse transform processing unit 308 may apply one or more inverse transforms to the transform coefficient blocks to generate residual blocks associated with the current block. For example, the inverse transform processing unit 308 may apply an inverse DCT, an inverse integer transform, an inverse Karhunen-Loeve transform (KLT), an inverse rotational transform, an inverse transform, or another inverse transform to the transform coefficient blocks.
[0328]
[0210] Furthermore, prediction processing unit 304 generates a predictive block according to the prediction information syntax element entropy decoded by entropy decoding unit 302. For example, if the prediction information syntax element indicates that the current block is inter-predicted, motion compensation unit 316 may generate a predictive block. In this case, the prediction information syntax element may indicate a reference picture in DPB 314 from which to retrieve a reference block, 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. Motion compensation unit 316 may generally perform the inter-prediction process in a manner substantially similar to that described with respect to motion compensation unit 224 (Figure 15).
[0329]
[0211] As another example, if the prediction information syntax element indicates that the current block is intra-predicted, intra prediction unit 318 may generate a predictive block according to the intra-prediction mode indicated by the prediction information syntax element. Again, intra prediction unit 318 may generally perform the intra-prediction process in a manner substantially similar to that described with respect to intra prediction unit 226 (Figure 15). Intra prediction unit 318 may retrieve data of neighboring samples for the current block from DPB 314.
[0330]
[0212] The reconstruction unit 310 may reconstruct the current block using the predictive block and the residual block. For example, the reconstruction unit 310 may add samples of the residual block to corresponding samples of the predictive block to reconstruct the current block.
[0331]
[0213] Filter unit 312 may perform one or more filter operations on the reconstructed blocks. For example, filter unit 312 may perform a deblocking operation to reduce blockiness artifacts along the edges of the reconstructed blocks. The operations of filter unit 312 are not necessarily performed in all examples.
[0332] The video decoder 300 may store the reconstructed block in the DPB 314. For example, in examples where the operations of the filter unit 312 are not performed, the reconstruction unit 310 may store the reconstructed block in the DPB 314. In examples where the operations of the filter unit 312 are performed, the filter unit 312 may store the filtered reconstructed block in the DPB 314. As described above, the DPB 314 may provide reference information to the prediction processing unit 304, such as samples of the current picture for intra prediction and previously decoded pictures for subsequent motion compensation. Moreover, the video decoder 300 may output the decoded picture (e.g., decoded video) from the DPB 314 for subsequent presentation on a display device, such as the display device 118 of FIG. 1.
[0333]
[0215] Figure 17 shows an example implementation of filter unit 312 in Figure 16. Filter unit 216 in Figure 15 may be implemented in the same manner. Filter units 216, 312, possibly in conjunction with other components of video encoder 200 or video decoder 300, may perform the techniques of this disclosure. In Figure 16, filter unit 312 includes a deblocking filter 342, an SAO filter 344, and an ALF unit 346. SAO filter 344 may be configured to determine offset values for samples of blocks, for example, in a manner described in this disclosure. ALF unit 346 may similarly filter blocks of video data in a manner described in this disclosure. For example, the ALF unit 346 may be configured to apply a first stage of ALF to reconstructed samples of the reconstructed block to determine first sample modification values, apply a second stage of ALF to the reconstructed samples to determine second sample modification values, and determine filtered reconstructed samples based on the reconstructed samples, the first sample modification values, and the second sample modification values.
[0334] Filter unit 312 may include fewer filters and / or additional filters. In addition, the particular filters shown in FIG. 17 may be implemented in a different order. Other loop filters (either within the coding loop or after the coding loop) may be used to smooth pixel transitions or otherwise improve video quality. The filtered reconstructed video blocks output by filter unit 312 may be stored in DPB 314, which stores reference pictures used for subsequent motion compensation. DPB 314 may be part of, or separate from, additional memory that stores decoded video for later presentation on a display device, such as display device 118 of FIG. 1.
[0335] 18 is a flowchart illustrating an example process for encoding a current block in accordance with the techniques of this disclosure. The current block may comprise a current CU. Although described with respect to video encoder 200 (FIGS. 1 and 14), it should be understood that other devices may be configured to perform a process similar to that of FIG. 18.
[0336] In this example, the video encoder 200 first predicts the current block (650). For example, the video encoder 200 may form a predictive block for the current block. The video encoder 200 may then calculate a residual block for the current block (652). To calculate the residual block, the video encoder 200 may calculate the difference between the original uncoded block and the predictive block for the current block. The video encoder 200 may then transform the residual block and quantize the transform coefficients of the residual block (654). The video encoder 200 may then scan the quantized transform coefficients of the residual block (656). During or following the scan, the video encoder 200 may entropy code the transform coefficients (658). For example, the video encoder 200 may code the transform coefficients using CAVLC or CABAC. The video encoder 200 may then output entropy-coded data for the block (660).
[0337] 19 is a flowchart illustrating an example process for decoding a current block of video data in accordance with the techniques of this disclosure. The current block may comprise a current CU. Although described with respect to video decoder 300 (FIGS. 1 and 15), it should be understood that other devices may be configured to perform a process similar to that of FIG. 19.
[0338] The video decoder 300 may receive entropy-coded data for the current block, such as entropy-coded prediction information and entropy-coded data for the transform coefficients of a residual block corresponding to the current block (670). The video decoder 300 may entropy decode the entropy-coded data to determine prediction information for the current block and to reconstruct the transform coefficients of the residual block (672). The video decoder 300 may predict the current block, e.g., using the intra-prediction or inter-prediction mode indicated by the prediction information for the current block, to calculate a predictive block for the current block (674). The video decoder 300 may then inverse-scan the reconstructed transform coefficients to create a block of quantized transform coefficients (676). The video decoder 300 may then dequantize the transform coefficients and apply an inverse transform to the transform coefficients to generate a residual block (678). The video decoder 300 may finally decode the current block by combining the predictive block and the residual block (680).
[0339]
[0221] Figure 20 is a flowchart illustrating an example process for decoding a current block of video data in accordance with the techniques of this disclosure. Although described with respect to video decoder 300 (Figures 1 and 15), it should be understood that other devices may be configured to perform a process similar to that of Figure 20. For example, the video decoding loop of video encoder 200, including filter unit 216, may perform the technique of Figure 20.
[0340] The video decoder 300 applies a first-stage ALF to reconstructed samples of a reconstructed block, where applying the first-stage ALF comprises (710). In this context, the reconstructed samples may be either reconstructed samples before deblock filtering or reconstructed samples after deblock filtering. To apply the first-stage ALF, the video decoder 300 determines a first class index for the reconstructed samples (712), selects a filter from a first set of filters based on the first class index (714), and applies the filter from the first set of filters to the reconstructed samples to determine a first intermediate sample value (716). As described above, the video decoder 300 may select a first set of filters from multiple sets of fixed filters based on a quantization parameter for the reconstructed block. The first set of filters may be, for example, fixed filters. That is, the first set of filters may be a set of filters stored within the video codec rather than signaled with the video data. The first set of filters may include, for example, at least one 9x9 diamond-shaped filter or a filter of any size or shape described above. As shown in Figures 9 and 11, the video decoder may determine a plurality of intermediate sample values.
[0341] To determine the first class index, the video decoder 300 may determine an activity value for the reconstructed sample, determine a direction for the reconstructed sample, and determine a classifier based on the activity value and the direction. As described above, the number of directions is M D,i = (S+1) x (S+2), which means that with S equal to 6, there are 56 directions.
[0342] The video decoder 300 applies a second-stage ALF to the reconstructed samples (720). To apply the second-stage ALF, the video decoder 300 determines a second class index for the reconstructed samples (722), selects a second filter from a second set of filters based on the second class index (724), applies the second filter to the reconstructed samples to determine a first sample modification value (726), and determines the second sample modification value based on the first intermediate sample value. The second set of filters may, for example, be signaled filters, meaning that the filters in the second set are signaled, at least in part, within the video data.
[0343] The video decoder 300 determines a filtered reconstructed sample based on the reconstructed sample, the first sample modification value, and the second sample modification value (730). To determine the filtered reconstructed sample based on the reconstructed sample, the first sample modification value, and the second sample modification value, the video decoder 300 may, for example, add the first sample modification value and the second sample modification value to the reconstructed sample. Equation (28) above represents an example of how the video decoder 300 may determine a value for the filtered reconstructed sample.
[0344]
[0226] To determine the second sample modification value based on the first intermediate sample value, the video decoder 300 may clip the second sample modification value to determine a clipped sample modification value, and add the first sample modification value and the clipped sample modification value to the reconstructed sample. The video decoder 300 may receive the clipped sample modification value within the video data. To determine the second sample modification value based on the first intermediate sample value, the video decoder 300 may determine the second sample modification value based on the first intermediate sample value also by determining a difference between the reconstructed sample and the first intermediate sample value. Equation (28) and Equation (30) above represent examples of how the video decoder 300 may determine the second sample modification value.
[0345] The video decoder 300 may output a decoded picture of the video data, including the filtered reconstructed samples. In some coding scenarios, the video decoder 300 may perform one or more additional filtering operations on the filtered reconstructed samples before output. The video decoder 300 may output the decoded picture by storing the picture in a decoded picture buffer for use in decoding subsequent pictures, by storing the decoded picture on a storage medium for later display, or by outputting the decoded picture to a display device for real-time or near-real-time display. In examples in which the techniques of FIG. 20 are performed by a video encoder, the video encoder may output the decoded picture, for example, by storing the picture in a decoded picture buffer for use in encoding subsequent pictures.
[0346]
[0228] The following numbered clauses describe one or more aspects of the devices and techniques described in this disclosure.
[0347]
[0229] Clause 1A. A method of decoding video data, the method comprising determining a reconstructed block of the video data and applying a filter to samples of the reconstructed block of the video data to generate a filtered reconstructed block.
[0348] Clause 2A. The method of clause 1A, wherein applying a filter to the sample comprises determining one or both of an activity value for the sample and a direction for the sample, and selecting a filter from a set of filters based on the determined activity value and / or direction.
[0349]
[0231] Clause 3A. The method of clause 2A, wherein the set of filters comprises a fixed set of filters.
[0350]
[0232] Clause 4A. The method of clause 2A, wherein the set of filters comprises a signaled set of filters.
[0351] Clause 5A. The method of any of clauses 1A to 4A, wherein applying a filter to the samples comprises applying a first filter to the samples to determine intermediate filtered samples, and applying a second filter to the intermediate filtered samples to determine a final sampled filter.
[0352]
[0234] Clause 6A. The method of any of clauses 1A to 5A, wherein the decoding method is performed as part of a video coding process.
[0353]
[0235] Clause 7A. A device for coding video data, the device comprising one or more means for performing the method according to any of clauses 1A to 6A.
[0354]
[0236] Clause 8A. The device of clause 7A, wherein the one or more means comprise one or more processors implemented in circuitry.
[0355]
[0237] Clause 9A. The device of any of clauses 7A and 8A, further comprising a memory for storing video data.
[0356]
[0238] Clause 10A. The device of any of clauses 7A to 9A, further comprising a display configured to display the decoded video data.
[0357]
[0239] Clause 11A. The device of any of clauses 7A to 10A, wherein the device comprises one or more of a camera, a computer, a mobile device, a broadcast receiver device, or a set-top box.
[0358]
[0240] Clause 12A. The device of any of clauses 7A to 11A, wherein the device comprises a video decoder.
[0359]
[0241] Clause 13A. The device of any of clauses 7A to 12A, wherein the device comprises a video encoder.
[0360]
[0242] Clause 14A. A computer-readable storage medium having stored thereon instructions that, when executed, cause one or more processors to perform the method of any of clauses 1A-6A.
[0361] Clause 1B. A method of decoding video data, the method comprising: decoding at least a portion of pictures of the video data; applying one or more adaptive loop filters (ALFs) to at least the portion of the pictures during a first stage of the ALF to generate filtered samples for the at least the portion of the pictures; determining whether to perform a second stage of the ALF for the at least the portion of the pictures; and when the determination is not to perform the second stage of the ALF, avoiding decoding filter coefficients for one or more ALFs for the second stage of the ALF and avoiding performing the second stage of the ALF for the at least the portion of the pictures; and using the filtered samples to generate final samples for the at least the portion of the pictures.
[0362] Clause 2B. Using the filtered sample to generate the final sample
[0363]
number
[0364] and calculating a final sample according to
[0365]
number
[0366] represents one of the final samples at position (x, y), and w i The method of clause 1B, wherein R′(x,y,i) comprises a weight value for the i-th ALF of one or more ALFs, and R′(x,y,i) comprises one of the filtered samples generated by the i-th ALF at position (x,y).
[0367] Clause 3B. Weight values w from fixed configuration data iThe method of clause 2B, further comprising determining:
[0368] Clause 4B. The weight value w is calculated from the decoded filter usage information. i The method of clause 2B, further comprising determining:
[0369] Clause 5B. Weight value w i The method of clause 2B, further comprising decrypting the
[0370] Clause 6B. Weight value w i decoding the weight value w from one or more of a sequence parameter set (SPS), a picture parameter set (PPS), a slice header, a sub-picture header, a coding tree unit (CTU) header, a coding tree block (CTB) header, or a sub-block header; i 5B. The method of claim 5B, comprising:
[0371] Clause 7B. The weight value w used for one or more of the final samples i The method of any of clauses 2B-6B, further comprising decoding data for syntax elements representing combinations of
[0372]
[0250] Clause 8B. The method of any of clauses 1B to 7B, wherein determining whether to execute the second stage of the ALF comprises decoding data indicative of whether to execute the second stage of the ALF.
[0373]
[0251] Clause 9B. The method of clause 8B, wherein decoding the data indicating whether to perform a second stage of the ALF comprises decoding one or more of the following data: a sequence parameter set (SPS), a picture parameter set (PPS), a slice header, a sub-picture header, a coding tree unit (CTU) header, a coding tree block (CTB) header, or a sub-block header.
[0374] Clause 10B. The method of any of clauses 8B and 9B, wherein decoding the data representing whether to execute the second stage of the ALF comprises decoding a value for a syntax element, the value indicating that the second stage of the ALF should be bypassed.
[0375]
[0253] Clause 11B. The method of any of clauses 1B to 7B, wherein determining whether to perform a second stage of the ALF comprises adaptively deriving whether to perform the second stage of the ALF according to previously decoded coding information.
[0376]
[0254] Clause 12B. The method of clause 11B, wherein the previously decoded coding information comprises one or more of a quantization parameter (QP) for a block in at least a portion of the picture, a size of the block, or whether the block is predicted using intra prediction or inter prediction.
[0377] Clause 13B. The method of any of clauses 1B to 12B, wherein using the filtered samples to generate the final samples comprises scaling the filtered samples to generate the final samples.
[0378] Clause 14B. The method of any of clauses 1B to 13B, further comprising encoding at least a portion of the picture before decoding at least a portion of the picture.
[0379]
[0257] Clause 15B. A device for decoding video data, the device comprising one or more means for performing the method according to any of clauses 1B to 14B.
[0380]
[0258] Clause 16B. The device of clause 15B, wherein the one or more means comprise one or more processors implemented in circuitry.
[0381]
[0259] Clause 17B. The device of any of clauses 15B and 16B, further comprising a display configured to display the decoded video data.
[0382]
[0260] Clause 18B. The device of any of clauses 15B to 17B, wherein the device comprises one or more of a camera, a computer, a mobile device, a broadcast receiver device, or a set-top box.
[0383]
[0261] Clause 19B. The device of clauses 15B-18B, further comprising a memory configured to store video data.
[0384]
[0262] Clause 20B. A computer-readable storage medium having stored thereon instructions that, when executed, cause a processor of a device for decoding video data to perform the method of any of clauses 1B to 14B.
[0385] Clause 21B. A device for decoding video data, the device comprising: means for decoding at least a portion of pictures of the video data; means for applying one or more adaptive loop filters (ALFs) to at least a portion of the pictures during a first stage of the ALF to generate filtered samples for the at least a portion of the pictures; means for determining whether to perform a second stage of the ALF on at least a portion of the pictures; means for avoiding decoding filter coefficients for one or more ALFs for the second stage of the ALF when the determination is not to perform the second stage of the ALF; means for avoiding performing the second stage of the ALF for at least a portion of the pictures when the determination is not to perform the second stage of the ALF; and means for using the filtered samples to generate final samples for at least a portion of the pictures.
[0386] Clause 1C. A method of decoding video data, the method comprising applying a first-stage adaptive loop filter (ALF) to reconstructed samples of a reconstructed block, wherein applying the first-stage ALF comprises determining a first class index for the reconstructed samples, selecting a filter from a first set of filters based on the first class index, and applying the filter from the first set of filters to the reconstructed samples to determine a first intermediate sample value; applying a second-stage ALF to the reconstructed samples, wherein applying the second-stage ALF comprises determining a second class index for the reconstructed samples, selecting a second filter from the second set of filters based on the second class index, applying the second filter to the reconstructed samples to determine a first sample-modification value, and determining a second sample-modification value based on the first intermediate sample value; and determining a filtered reconstructed sample based on the reconstructed sample, the first sample-modification value, and the second sample-modification value.
[0387]
[0265] Clause 2C. The method of clause 1C, wherein the first set of filters comprises fixed filters.
[0388]
[0266] Clause 3C. The method of any of clauses 1C to 2C, wherein the second set of filters comprises signaled filters determined based on syntax signaled in the video data.
[0389] Clause 4C. The method of any of clauses 1C to 3C, wherein determining the first class index comprises determining an activity value for the reconstructed sample, determining a direction for the reconstructed sample, and determining the first class index based on the activity value and the direction.
[0390]
[0268] Clause 5C. The method of clause 4C, wherein determining the direction comprises assigning one of 56 values to the direction.
[0391]
[0269] Clause 6C. The method of any of clauses 1C-5C, wherein the first set of filters includes a 9x9 diamond-shaped filter.
[0392] Clause 7C. The method of any of clauses 1C-6C, wherein determining the filtered reconstructed sample based on the reconstructed sample, the first sample modification value, and the second sample modification value comprises adding the first sample modification value and the second sample modification value to the reconstructed sample.
[0393] Clause 8C. The method of any of clauses 1C to 7C, wherein determining a second sample modification value based on the first intermediate sample value comprises clipping the second sample modification value to determine a clipped sample modification value, and adding the first sample modification value and the clipped sample modification value to the reconstructed sample.
[0394]
[0272] Clause 9C. The method of clause 8C, further comprising receiving clipped sample modification values within the video data.
[0395] Clause 10C. The method of any of clauses 1C to 9C, wherein determining the second sample modification value based on the first intermediate sample value comprises determining a difference between the reconstructed sample and the first intermediate sample value.
[0396]
[0274] Clause 11C. The method of any of clauses 1C-10C, further comprising selecting a first set of filters from a plurality of sets of fixed filters based on a quantization parameter for the reconstructed block.
[0397] Clause 12C. The method of any of clauses 1C to 11C, wherein applying the first-stage ALF further comprises determining a third class index for the reconstructed samples, selecting a third filter from a second set of filters based on the third class index, and applying the third filter from the second set of filters to the reconstructed samples to determine a second intermediate sample value, and wherein applying the second-stage ALF to the reconstructed samples further comprises determining a second sample modification value based on the first intermediate sample value and the second intermediate sample value.
[0398]
[0276] Clause 13C. The method of any of clauses 1C to 12C, further comprising adding a predicted sample value to a residual sample value to determine a reconstructed sample.
[0399]
[0277] Clause 14C. The method of any of clauses 13C, further comprising applying a deblocking filter to a sum of predicted sample values and residual sample values to determine a reconstructed sample.
[0400]
[0278] Clause 15C. The method of any of clauses 1C to 14C, further comprising outputting a decoded picture of the video data, wherein the decoded picture comprises filtered reconstructed samples.
[0401]
[0279] Clause 16C. A method according to any one of clauses 1C to 14C, wherein the decoding method is performed as part of a video encoding process.
[0402] Clause 17C. A device for decoding video data, the device comprising: a memory configured to store the video data; and a circuit configured to apply a first stage adaptive loop filter (ALF) to reconstructed samples of a reconstruction block, wherein, to apply the first stage ALF, one or more processors are further configured to: determine a first class index for the reconstructed samples; select a filter from a first set of filters based on the first class index; and apply the filter from the first set of filters to the reconstructed samples to determine a first intermediate sample value; and apply a second stage ALF to the reconstructed samples. and wherein, to apply a second stage of ALF, the one or more processors are further configured to: determine a second class index for the reconstructed sample; select a second filter from a second set of filters based on the second class index; apply the second filter to the reconstructed sample to determine a first sample modification value; and determine the second sample modification value based on the first intermediate sample value; and determine a filtered reconstructed sample based on the reconstructed sample, the first sample modification value, and the second sample modification value.
[0403]
[0281] Clause 18C. The apparatus of clause 17C, wherein the first set of filters comprises fixed filters.
[0404]
[0282] Clause 19C. The device of any of clauses 17C-18C, wherein the second set of filters comprises signaled filters determined based on syntax signaled in the video data.
[0405] Clause 20C. The device of any of clauses 17C to 19C, wherein, to determine the first class index, the one or more processors are further configured to: determine an activity value for the reconstructed sample; determine a direction for the reconstructed sample; and determine the first class index based on the activity value and the direction.
[0406]
[0284] Clause 21C. The device of clause 20C, wherein to determine the direction, the one or more processors are further configured to assign one of 56 values to the direction.
[0407]
[0285] Clause 22C. The apparatus of any of clauses 17C to 21C, wherein the first set of filters includes 9x9 diamond-shaped filters.
[0408] Clause 23C. The device of any of clauses 17C to 22C, wherein the one or more processors are further configured to add the first sample modification value and the second sample modification value to the reconstructed sample to determine a filtered reconstructed sample based on the reconstructed sample, the first sample modification value, and the second sample modification value.
[0409] Clause 24C. The device of any of clauses 17C to 23C, wherein, to determine a second sample modification value based on the first intermediate sample value, the one or more processors are further configured to: clip the second sample modification value to determine a clipped sample modification value; and add the first sample modification value and the clipped sample modification value to the reconstructed sample.
[0410]
[0288] Clause 25C. The device of clause 24C, wherein the one or more processors are further configured to receive, within the video data, clipped sample modification values.
[0411] Clause 26C. The device of any of clauses 17C to 25C, wherein, to determine a second sample modification value based on the first intermediate sample value, the one or more processors are further configured to determine a difference between the reconstructed sample and the first intermediate sample value.
[0412] Clause 27C. The device of any of clauses 17-26C, wherein the one or more processors are further configured to select a first set of filters from a plurality of sets of fixed filters based on a quantization parameter for the reconstructed block.
[0413] Clause 28C. The device of any of clauses 17C to 27C, wherein, to apply the first stage of ALF, the one or more processors are further configured to: determine a third class index for the reconstructed samples; select a third filter from the second set of filters based on the third class index; and apply the third filter from the second set of filters to the reconstructed samples to determine a second intermediate sample value; and, to apply the second stage of ALF to the reconstructed samples, the one or more processors are further configured to determine a second sample modification value based on the first intermediate sample value and the second intermediate sample value.
[0414] Clause 29C. The device of any of clauses 17C to 28C, wherein the one or more processors are further configured to add the predicted sample values to the residual sample values to determine the reconstructed samples.
[0415]
[0293] Clause 30C. The device of clause 28C, wherein the one or more processors are further configured to apply a deblocking filter to a sum of the predicted sample values and the residual sample values to determine the reconstructed samples.
[0416]
[0294] Clause 31C. The device of any of clauses 17C to 30C, wherein the one or more processors are further configured to output decoded pictures of the video data, wherein the decoded pictures comprise filtered reconstructed samples.
[0417]
[0295] Clause 32C. The device of any of clauses 17C to 31C, wherein the device comprises a video encoding device.
[0418]
[0296] Clause 33C. The device of any of clauses 17C to 32C, wherein the one or more processors are further configured to output decoded pictures of the video data, wherein the decoded pictures comprise filtered reconstructed samples.
[0419]
[0297] Clause 34C. The device of clause 33C, comprising a wireless communications device, wherein the device further comprises a receiver configured to receive encoded video data.
[0420]
[0298] Clause 35C. The device of clause 34C, wherein the wireless communication device comprises a telephone handset, wherein the receiver is configured to demodulate a signal comprising the encoded video data in accordance with a wireless communication standard.
[0421]
[0299] Clause 36C. The device of any of clauses 17C to 35C, further comprising a display configured to display the decoded video data.
[0422]
[0300] Clause 37C. The device of any of clauses 17C to 36C, wherein the device comprises one or more of a camera, a computer, a mobile device, a broadcast receiver device, or a set-top box.
[0423]
[0301] Clause 38C. The device of any of clauses 17C to 37C, wherein the device comprises a video encoding device.
[0424] Clause 39C. When executed by one or more processors, the one or more processors apply a first stage adaptive loop filter (ALF) to reconstructed samples of a reconstruction block, wherein, to apply the first stage ALF, the one or more processors are further configured to: determine a first class index for the reconstructed samples; select a filter from a first set of filters based on the first class index; and apply the filter from the first set of filters to the reconstructed samples to determine a first intermediate sample value; and apply a second stage ALF to the reconstructed samples; wherein, to apply a second stage of ALF, the one or more processors are further configured to: determine a second class index for the reconstructed sample; select a second filter from a second set of filters based on the second class index; apply the second filter to the reconstructed sample to determine a first sample modification value; and determine the second sample modification value based on the first intermediate sample value; and determine a filtered reconstructed sample based on the reconstructed sample, the first sample modification value, and the second sample modification value.
[0425] Clause 1D. A method of decoding video data, the method comprising applying a first-stage adaptive loop filter (ALF) to reconstructed samples of a reconstructed block, wherein applying the first-stage ALF comprises determining a first class index for the reconstructed samples, selecting a filter from a first set of filters based on the first class index, and applying the filter from the first set of filters to the reconstructed samples to determine a first intermediate sample value; applying a second-stage ALF to the reconstructed samples, wherein applying the second-stage ALF comprises determining a second class index for the reconstructed samples, selecting a second filter from the second set of filters based on the second class index, applying the second filter to the reconstructed samples to determine a first sample-modification value, and determining a second sample-modification value based on the first intermediate sample value; and determining a filtered reconstructed sample based on the reconstructed sample, the first sample-modification value, and the second sample-modification value.
[0426]
[0304] Clause 2D. The method of clause 1D, wherein the first set of filters comprises fixed filters.
[0427]
[0305] Clause 3D. The method of clause 1D, wherein the second set of filters comprises signaled filters determined based on syntax signaled in the video data.
[0428] Clause 4D. The method of clause 1D, wherein determining the first class index comprises determining an activity value for the reconstructed sample, determining a direction for the reconstructed sample, and determining the first class index based on the activity value and the direction.
[0429]
[0307] Clause 5D. The method of clause 4D, wherein determining the direction comprises assigning one of 56 values to the direction.
[0430]
[0308] Clause 6D. The method of clause 1D, wherein the first set of filters includes a 9x9 diamond-shaped filter.
[0431] Clause 7D. The method of clause 1D, wherein determining the filtered reconstructed sample based on the reconstructed sample, the first sample modification value, and the second sample modification value comprises adding the first sample modification value and the second sample modification value to the reconstructed sample.
[0432] Clause 8D. The method of clause 1D, wherein determining a second sample modification value based on the first intermediate sample value comprises clipping the second sample modification value to determine a clipped sample modification value, and adding the first sample modification value and the clipped sample modification value to the reconstructed sample.
[0433]
[0311] Clause 9D. The method of clause 8D, further comprising receiving clipped sample modification values within the video data.
[0434]
[0312] Clause 10D. The method of clause 1D, wherein determining the second sample modification value based on the first intermediate sample value comprises determining a difference between the reconstructed sample and the first intermediate sample value.
[0435]
[0313] Clause 11D. The method of clause 1D, further comprising selecting a first set of filters from a plurality of sets of fixed filters based on a quantization parameter for the reconstructed block.
[0436] Clause 12D. The method of clause 1D, wherein applying the first stage ALF further comprises determining a third class index for the reconstructed samples, selecting a second filter from a second set of filters based on the third class index, and applying the second filter from the second set of filters to the reconstructed samples to determine a second intermediate sample value, and wherein applying the second stage ALF to the reconstructed samples further comprises determining a second sample modification value based on the first intermediate sample value and the second intermediate sample value.
[0437]
[0315] Clause 13D. The method of clause 1D, further comprising adding predicted sample values to residual sample values to determine reconstructed samples.
[0438]
[0316] Clause 14D. The method of clause 13D, further comprising applying a deblocking filter to a sum of the predicted sample values and the residual sample values to determine the reconstructed sample.
[0439]
[0317] Clause 15D. The method of clause 1D, further comprising outputting a decoded picture of the video data, wherein the decoded picture comprises the filtered reconstructed samples.
[0440]
[0318] Clause 16D. The method of clause 1D, wherein the decoding method is performed as part of a video encoding process.
[0441] Clause 17D. A device for decoding video data, the device including: a memory configured to store the video data; and a circuit configured to apply a first stage adaptive loop filter (ALF) to reconstructed samples of a reconstruction block, wherein, to apply the first stage ALF, one or more processors are further configured to: determine a first class index for the reconstructed samples; select a filter from a first set of filters based on the first class index; apply the filter from the first set of filters to the reconstructed samples to determine a first intermediate sample value; and apply a second stage ALF to the reconstructed samples. and wherein, to apply a second stage of ALF, the one or more processors are further configured to: determine a second class index for the reconstructed sample; select a second filter from a second set of filters based on the second class index; apply the second filter to the reconstructed sample to determine a first sample modification value; and determine the second sample modification value based on the first intermediate sample value; and determine a filtered reconstructed sample based on the reconstructed sample, the first sample modification value, and the second sample modification value.
[0442]
[0320] Clause 18D. The apparatus of clause 17D, wherein the first set of filters comprises fixed filters.
[0443]
[0321] Clause 19D. The device of clause 17D, wherein the second set of filters comprises signaled filters determined based on syntax signaled in the video data.
[0444] Clause 20D. The device of clause 17D, wherein, to determine the first class index, the one or more processors are further configured to: determine an activity value for the reconstructed sample, determine a direction for the reconstructed sample, and determine the first class index based on the activity value and the direction.
[0445]
[0323] Clause 21D. The device of clause 20D, wherein to determine the direction, the one or more processors are further configured to assign one of 56 values to the direction.
[0446]
[0324] Clause 22D. The device of clause 17D, wherein the first set of filters includes 9x9 diamond-shaped filters.
[0447] Clause 23D. The device of Clause 17D, wherein the one or more processors are further configured to add the first sample modification value and the second sample modification value to the reconstructed sample to determine a filtered reconstructed sample based on the reconstructed sample, the first sample modification value, and the second sample modification value.
[0448] Clause 24D. The device of Clause 17D, wherein, to determine a second sample modification value based on the first intermediate sample value, the one or more processors are further configured to: clip the second sample modification value to determine a clipped sample modification value; and add the first sample modification value and the clipped sample modification value to the reconstructed sample.
[0449]
[0327] Clause 25D. The device of clause 24D, wherein the one or more processors are further configured to receive, within the video data, clipped sample modification values.
[0450] Clause 26D. The device of clause 17D, wherein to determine a second sample modification value based on the first intermediate sample value, the one or more processors are further configured to determine a difference between the reconstructed sample and the first intermediate sample value.
[0451]
[0329] Clause 27D. The device of clause 17D, wherein the one or more processors are further configured to select a first set of filters from a plurality of sets of fixed filters based on a quantization parameter for the reconstructed block.
[0452] Clause 28D. The device of clause 17D, wherein, to apply the first stage of ALF, the one or more processors are further configured to: determine a third class index for the reconstructed samples, select a second filter from the second set of filters based on the third class index, and apply the second filter from the second set of filters to the reconstructed samples to determine a second intermediate sample value; and, to apply the second stage of ALF to the reconstructed samples, the one or more processors are further configured to determine a second sample modification value based on the first intermediate sample value and the second intermediate sample value.
[0453]
[0331] Clause 29D. The device of clause 17D, wherein the one or more processors are further configured to add the predicted sample values to the residual sample values to determine the reconstructed samples.
[0454]
[0332] Clause 30D. The device of clause 28D, wherein the one or more processors are further configured to apply a deblocking filter to a sum of the predicted sample values and the residual sample values to determine the reconstructed samples.
[0455]
[0333] Clause 31D. The device of clause 17D, wherein the one or more processors are further configured to output decoded pictures of the video data, wherein the decoded pictures comprise filtered reconstructed samples.
[0456]
[0334] Clause 32D. The device of clause 17D, wherein the device comprises a video encoding device.
[0457]
[0335] Clause 33D. The device of clause 17D, wherein the one or more processors are further configured to output decoded pictures of the video data, wherein the decoded pictures comprise filtered reconstructed samples.
[0458]
[0336] Clause 34D. The device of clause 33D, comprising a wireless communication device, wherein the device further comprises a receiver configured to receive encoded video data.
[0459]
[0337] Clause 35D. The device of clause 34D, wherein the wireless communication device comprises a telephone handset, wherein the receiver is configured to demodulate a signal comprising the encoded video data in accordance with a wireless communication standard.
[0460]
[0338] Clause 36D. The device of clause 17D, further comprising a display configured to display the decoded video data.
[0461]
[0339] Clause 37D. The device of clause 17D, wherein the device comprises one or more of a camera, a computer, a mobile device, a broadcast receiver device, or a set-top box.
[0462]
[0340] Clause 38D. The device of clause 17D, wherein the device comprises a video encoding device.
[0463] Clause 39D. When executed by one or more processors, the one or more processors apply a first stage adaptive loop filter (ALF) to reconstructed samples of a reconstruction block, wherein, to apply the first stage ALF, the one or more processors are further configured to: determine a first class index for the reconstructed samples; select a filter from a first set of filters based on the first class index; and apply the filter from the first set of filters to the reconstructed samples to determine a first intermediate sample value; and apply a second stage ALF to the reconstructed samples; wherein, to apply a second stage of ALF, the one or more processors are further configured to: determine a second class index for the reconstructed sample; select a second filter from a second set of filters based on the second class index; apply the second filter to the reconstructed sample to determine a first sample modification value; and determine the second sample modification value based on the first intermediate sample value; and determine a filtered reconstructed sample based on the reconstructed sample, the first sample modification value, and the second sample modification value.
[0464]
[0342] In accordance with the above examples, it should be recognized that some acts or events of any of the techniques described herein may be performed in a different sequence, added, merged, or entirely excluded (e.g., not all described acts or events may be required to practice the techniques). Moreover, in some examples, acts or events may be performed simultaneously rather than sequentially, for example, through multithreaded processing, interrupt processing, or multiple processors.
[0465] In one or more examples, the functions described may be implemented in hardware, software, firmware, or any combination thereof. If implemented in software, the functions may be stored on or transmitted via a computer-readable medium as one or more instructions or code and executed by a hardware-based processing unit. Computer-readable media may include computer-readable storage media, which correspond to tangible media such as data storage media, or communication media, including any medium that enables transfer of a computer program from one place to another, for example, according to a communication protocol. In this manner, computer-readable media may generally correspond to (1) tangible computer-readable storage media that are non-transitory, or (2) a communication medium such as a signal or carrier wave. Data storage media may be any available medium that can be accessed by one or more computers or one or more processors to retrieve instructions, code, and / or data structures for implementing the techniques described in this disclosure. A computer program product may include a computer-readable medium.
[0466]
[0344] By way of example, and not limitation, such computer-readable storage media may comprise 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 that can be accessed by a computer. Also, any connection is properly termed a computer-readable medium. For example, if instructions are transmitted from a website, server, or other remote source using coaxial cable, fiber optic cable, twisted pair, digital subscriber line (DSL), or wireless technologies such as infrared, radio, and microwave, the coaxial cable, fiber optic cable, twisted pair, DSL, or wireless technologies such as infrared, radio, and microwave are included in the definition of medium. However, it should be understood that computer-readable storage media and data storage media do not include connections, carrier waves, signals, or other transitory media, but instead cover non-transitory tangible storage media. As used herein, disk and disc include compact discs (CDs), laser discs, optical discs, digital versatile discs (DVDs), floppy disks, and Blu-ray discs, where disks typically reproduce data magnetically and discs reproduce data optically with a laser. Combinations of the above should also be included within the scope of computer-readable media.
[0467]
[0345] The 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. Accordingly, the terms "processor" and "processing circuitry" as used herein may refer to any of the above structures or any other structure suitable for implementing the techniques described herein. Furthermore, in some aspects, the functionality described herein may be provided in dedicated hardware and / or software modules configured for encoding and decoding, or incorporated into a combined codec. Also, the techniques may be fully implemented in one or more circuits or logic elements.
[0468] The techniques of this disclosure may be implemented in a wide variety of devices or apparatuses, including wireless handsets, integrated circuits (ICs), or sets of ICs (e.g., chipsets). Although various components, modules, or units have been described in this disclosure to highlight functional aspects of devices configured to implement the disclosed techniques, those components, modules, or units do not necessarily require realization by different hardware units. Rather, as described above, the various units may be combined in a codec hardware unit or provided by a collection of interoperable hardware units, including one or more processors described above, along with suitable software and / or firmware.
[0469]
[0347] Various examples have been described. These and other examples are within the scope of the following claims. The inventions described in the claims of the present application as originally filed are set forth below. [C1] 1. A method for decoding video data, said method comprising: applying a first stage adaptive loop filter (ALF) to reconstructed samples of a reconstructed block; and wherein applying the first stage ALF includes: determining a first class index for the reconstructed sample; selecting a filter from a first set of filters based on the first class index; applying the filter from the first set of filters to the reconstructed sample to determine a first intermediate sample value; Equipped with applying a second-stage ALF to the reconstructed sample; and wherein applying the second-stage ALF comprises: determining a second class index for the reconstructed sample; selecting a second filter from a second set of filters based on the second class index; applying the second filter to the reconstructed samples to determine first sample modification values; determining a second sample modification value based on the first intermediate sample value; Equipped with determining a filtered reconstructed sample based on the reconstructed sample, the first sample modification value, and the second sample modification value; A method comprising: [C2] The method of C1, wherein the first set of filters comprises fixed filters. [C3] The method of C1, wherein the second set of filters comprises signaled filters determined based on syntax signaled in the video data. [C4] determining the first class index determining an activity value for the reconstructed sample; determining an orientation for the reconstructed sample; determining the first class index based on the activity value and the direction; The method of claim C1, comprising: [C5] The method of C4, wherein determining the direction comprises assigning one of 56 values to the direction. [C6] The method of C1, wherein the first set of filters includes a 9x9 diamond-shaped filter. [C7] The method of claim 1, wherein determining the filtered reconstructed sample based on the reconstructed sample, the first sample modification value, and the second sample modification value comprises adding the first sample modification value and the second sample modification value to the reconstructed sample. [C8] The method of claim 1, wherein determining the second sample modification value based on the first intermediate sample value comprises clipping the second sample modification value to determine a clipped sample modification value, and adding the first sample modification value and the clipped sample modification value to the reconstructed sample. [C9] The method of C8, further comprising receiving the clipped sample modification values within the video data. [C10] The method of C1, wherein determining the second sample modification value based on the first intermediate sample value comprises determining a difference between the reconstructed sample and the first intermediate sample value. [C11] selecting the first set of filters from a plurality of sets of fixed filters based on a quantization parameter for the reconstructed block; The method of C1, further comprising: [C12] applying the first stage ALF further comprises determining a third class index for the reconstructed sample; selecting a third filter from a second set of filters based on the third class index; and applying the third filter from the second set of filters to the reconstructed sample to determine a second intermediate sample value; applying the second stage ALF to the reconstructed samples further comprises determining the second sample modification values based on the first intermediate sample values and the second intermediate sample values. The method described in C1. [C13] adding predicted sample values to residual sample values to determine said reconstructed samples. The method of C1, further comprising: [C14] applying a deblocking filter to the sum of the predicted sample values and the residual sample values to determine the reconstructed samples. The method of C13, further comprising: [C15] outputting a decoded picture of the video data, wherein the decoded picture comprises the filtered reconstructed samples. The method described in C1. [C16] The method of claim C1, wherein said method of decoding is performed as part of a video encoding process. [C17] 1. A device for decoding video data, said device comprising: a memory configured to store video data; It is implemented in a circuit, applying a first stage adaptive loop filter (ALF) to the reconstructed samples of the reconstructed block, wherein to apply the first stage ALF, one or more processors: determining a first class index for the reconstructed sample; selecting a filter from a first set of filters based on the first class index; applying the filter from the first set of filters to the reconstructed sample to determine a first intermediate sample value; further configured to: applying a second stage ALF to the reconstructed samples, wherein to apply the second stage ALF, the one or more processors: determining a second class index for the reconstructed sample; selecting a second filter from a second set of filters based on the second class index; applying the second filter to the reconstructed samples to determine first sample modification values; determining a second sample modification value based on the first intermediate sample value; further configured to: determining a filtered reconstructed sample based on the reconstructed sample, the first sample modification value, and the second sample modification value; one or more processors configured to perform A device comprising: [C18] The device of C17, wherein the first set of filters comprises fixed filters. [C19] The device of C17, wherein the second set of filters comprises signaled filters determined based on syntax signaled within the video data. [C20] To determine the first class index, the one or more processors: determining an activity value for the reconstructed sample; determining an orientation for the reconstructed sample; determining the first class index based on the activity value and the direction; The device of C17, further configured to: [C21] The device of C20, wherein to determine the direction, the one or more processors are further configured to assign one of 56 values to the direction. [C22] The device of C17, wherein the first set of filters comprises 9x9 diamond-shaped filters. [C23] The device of C17, wherein the one or more processors are further configured to add the first sample modification value and the second sample modification value to the reconstructed sample to determine the filtered reconstructed sample based on the reconstructed sample, the first sample modification value, and the second sample modification value. [C24] The device of C17, wherein, to determine the second sample modification value based on the first intermediate sample value, the one or more processors are further configured to: clip the second sample modification value to determine a clipped sample modification value; and add the first sample modification value and the clipped sample modification value to the reconstructed sample. [C25] the one or more processors: receiving the clipped sample modification values within the video data; The device of C24, further configured as follows: [C26] The device of C17, wherein the one or more processors are further configured to determine a difference between the reconstructed sample and the first intermediate sample value to determine the second sample modification value based on the first intermediate sample value. [C27] the one or more processors: selecting the first set of filters from a plurality of sets of fixed filters based on a quantization parameter for the reconstructed block; The device of C17, further configured as follows: [C28] To apply the first stage ALF, the one or more processors are further configured to: determine a third class index for the reconstructed sample; select a third filter from a second set of filters based on the third class index; and apply the third filter from the second set of filters to the reconstructed sample to determine a second intermediate sample value; and to apply the second stage ALF to the reconstructed sample, the one or more processors are further configured to determine the second sample modification value based on the first intermediate sample value and the second intermediate sample value. The device described in C17. [C29] the one or more processors: The device of C17, further configured to add predicted sample values to residual sample values to determine the reconstructed samples. [C30] the one or more processors: applying a deblocking filter to the sum of the predicted sample values and the residual sample values to determine the reconstructed samples; The device of C29, further configured as follows: [C31] the one or more processors: outputting a decoded picture of the video data, wherein the decoded picture comprises the filtered reconstructed samples. The device of C17, further configured as follows: [C32] The device of C17, wherein the device comprises a video encoding device. [C33] The device of C32, comprising a wireless communication device, wherein the device further comprises a receiver configured to receive encoded video data. [C34] The device of C33, wherein the wireless communication device comprises a telephone handset, and wherein the receiver is configured to demodulate a signal comprising the encoded video data in accordance with a wireless communication standard. [C35] a display configured to display the decoded video data The device of C17, further comprising: [C36] The device of C17, wherein the device comprises one or more of a camera, a computer, a mobile device, a broadcast receiver device, or a set-top box. [C37] The device of C17, wherein the device comprises a video encoding device. [C38] When executed by one or more processors, the one or more processors: applying a first stage adaptive loop filter (ALF) to the reconstructed samples of the reconstructed block, wherein to apply the first stage ALF, the one or more processors: determining a first class index for the reconstructed sample; selecting a filter from a first set of filters based on the first class index; applying the filter from the first set of filters to the reconstructed sample to determine a first intermediate sample value; further configured to: applying a second stage ALF to the reconstructed samples, wherein to apply the second stage ALF, the one or more processors: determining a second class index for the reconstructed sample; selecting a second filter from a second set of filters based on the second class index; applying the second filter to the reconstructed samples to determine first sample modification values; determining a second sample modification value based on the first intermediate sample value; further configured to: determining a filtered reconstructed sample based on the reconstructed sample, the first sample modification value, and the second sample modification value; A computer-readable storage medium having stored thereon instructions for causing a
Claims
1. 1. A method for decoding video data, said method comprising: applying a first stage adaptive loop filter (ALF) to reconstructed samples of a reconstructed block; and wherein applying the first stage ALF comprises: i) determining a first class index for applying the first stage ALF on the reconstructed sample; ii) selecting a filter from a first set of filters for applying the first stage ALF based on the first class index; iii) applying the filter from the first set of filters to the reconstructed sample to determine a first intermediate sample value; Equipped with applying a second stage of ALF to the reconstructed sample; and wherein applying the second stage of ALF comprises: i) determining a second class index for applying the second-stage ALF on the reconstructed sample; ii) selecting a second filter from a second set of filters for applying the second stage ALF based on the second class index; iii) applying the second filter to the reconstructed samples to determine first sample modification values; and iv) determining a second sample modification value based on a difference between the reconstructed sample and the first intermediate sample value; Equipped with determining a filtered reconstructed sample based on the reconstructed sample, the first sample modification value, and the second sample modification value; A method comprising:
2. 1. A device for decoding video data, said device comprising: a memory configured to store video data; It is implemented in a circuit, applying a first stage adaptive loop filter (ALF) to the reconstructed samples of the reconstructed block, wherein to apply the first stage ALF, one or more processors: i) determining a first class index for applying the first stage ALF on the reconstructed sample; ii) selecting a filter from a first set of filters for applying the first stage ALF based on the first class index; iii) applying the filter from the first set of filters to the reconstructed sample to determine a first intermediate sample value; further configured to: applying a second stage of ALF to the reconstructed samples, wherein to apply the second stage of ALF, the one or more processors: i) determining a second class index for applying the second-stage ALF on the reconstructed sample; ii) selecting a second filter from a second set of filters for applying the second stage ALF based on the second class index; iii) applying the second filter to the reconstructed samples to determine first sample modification values; and iv) determining a second sample modification value based on a difference between the reconstructed sample and the first intermediate sample value; further configured to: determining a filtered reconstructed sample based on the reconstructed sample, the first sample modification value, and the second sample modification value; one or more processors configured to perform A device comprising:
3. 3. The device of claim 2, wherein the first set of filters comprises fixed filters and the second set of filters comprises signaled filters determined based on syntax signaled within the video data.
4. To determine the first class index, the one or more processors: i) determining an activity value for the reconstructed sample; ii) determining an orientation for the reconstructed sample; and iii) determining the first class index based on the activity value and the direction; The device of claim 2 , further configured to:
5. The device of claim 4 , wherein to determine the direction, the one or more processors are further configured to assign one of 56 values to the direction.
6. 3. The device of claim 2, wherein the one or more processors are further configured to add the first sample modification value and the second sample modification value to the reconstructed sample to determine the filtered reconstructed sample based on the reconstructed sample, the first sample modification value, and the second sample modification value.
7. 3. The device of claim 2, wherein, to determine the second sample modification value based on the first intermediate sample value, the one or more processors are further configured to: clip the second sample modification value to determine a clipped sample modification value; and add the first sample modification value and the clipped sample modification value to the reconstructed sample; and wherein the one or more processors are further configured to receive the clipped sample modification value within the video data.
8. the one or more processors: selecting the first set of filters from a plurality of sets of fixed filters based on a quantization parameter for the reconstructed block; The device of claim 2 further configured to:
9. to apply the first stage ALF, the one or more processors are further configured to: determine a third class index for the reconstructed sample; select a third filter from a second set of filters based on the third class index; and apply the third filter from the second set of filters to the reconstructed sample to determine a second intermediate sample value; the one or more processors are further configured to determine the second sample modification values based on the first intermediate sample values and the second intermediate sample values to apply the second stage ALF to the reconstructed samples. The device of claim 2 .
10. the one or more processors: adding predicted sample values to residual sample values to determine said reconstructed samples; applying a deblocking filter to the sum of the predicted sample values and the residual sample values to determine the reconstructed samples; The device of claim 2 further configured to:
11. the one or more processors: outputting a decoded picture of the video data, wherein the decoded picture comprises the filtered reconstructed samples. The device of claim 2 further configured to:
12. a display configured to display the decoded video data The device of claim 2 further comprising:
13. The device of claim 2 , wherein the device comprises one or more of a camera, a computer, a mobile device, a broadcast receiver device, or a set-top box.
14. 10. A computer-readable storage medium having stored thereon instructions that, when executed by one or more processors, cause the one or more processors to perform the method of claim 1.
Citation Information
Patent Citations
Image filtering method and device in image coding system
US20180160116A1
Predicting filter coefficients from fixed filters for video coding
WO2017142943A1
Methods for simplifying adaptive loop filter in video coding
WO2019089695A1
Image filtering device, image decoding device, and image encoding device
WO2019182159A1
An adaptive loop filter
WO2020182620A1