Virtual boundary processing for CCSAO, bilateral filters, and adaptive loop filters for video coding
By using cross-component sample adaptive offset technology in video decoding, the problem of sample filtering difficulty at virtual boundaries is solved, and the bit rate of the video bitstream and the fidelity of the decoded data are improved.
Patent Information
- Application Number
- CN202380032379.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2023-04-11
- Filing Date
- 2023-04-12
- Publication Date
- 2024-11-19
AI Technical Summary
When the existing video decoding technology processes video data containing virtual boundaries, it is difficult to effectively filter samples, resulting in an increase in the bit rate of the video bit stream and a decrease in the fidelity of the decoded data.
Using cross-component sample adaptive offset (CCSAO) technology, by calculating the frequency band information of the samples adjacent to the virtual boundary of the current sample, disable the samples along the virtual boundary, and use samples not along the virtual boundary for filtering to ensure that they are at the virtual boundary. Effective sample enhancement processing can still be performed.
The bit rate of the video bitstream is improved, the fidelity of the decoded data is improved, and effective filtering and sample enhancement processing can also be performed at virtual boundaries.
Smart Images

Figure CN118985126A_ABST
Abstract
Description
[0001] This application claims the benefit of U.S. Patent Application No. 18 / 298,787, filed on April 11, 2023, which in turn claims the benefit of U.S. Provisional Application No. 63 / 362,932, filed on April 13, 2022, the entire contents of which are hereby incorporated by reference. Technical Field
[0002] The present disclosure relates to video coding, including video encoding and video decoding. Background Art
[0003] Digital video capabilities may be incorporated into a wide variety of devices, including digital televisions, digital live 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 gaming consoles, cellular or satellite wireless telephones (so-called "smart phones"), video teleconferencing devices, video streaming devices, etc. Digital video devices implement video coding techniques, such as those described in the standards defined by MPEG-2, MPEG-4, ITU-T H.263, ITU-T H.264 / MPEG-4 (Part 10, Advanced Video Coding (AVC)), ITU-T H.265 / High Efficiency Video Coding (HEVC), ITU-T H.266 / Versatile Video Coding (VVC), and extensions of such standards, as well as proprietary video codecs / formats such as AOMedia Video 1 (AV1) developed by the Alliance for Open Media. By implementing such video decoding technology, a video device can send, receive, encode, decode and / or store digital video information more efficiently.
[0004] Video coding techniques include spatial (intra-picture) prediction and / or temporal (inter-picture) prediction to reduce or remove redundancy inherent in video sequences. For block-based video coding, a video slice (e.g., a video picture or a portion of a video picture) may be divided into video blocks, which may also be referred to as coding tree units (CTUs), coding units (CUs), and / or coding nodes. Video blocks in a slice of intra-coded (I) pictures are encoded using spatial predictions relative to reference samples in neighboring blocks in the same picture. Video blocks in a slice of inter-coded (P or B) pictures may use spatial predictions relative to reference samples in neighboring blocks in the same picture or temporal predictions relative to reference samples in other reference pictures. Pictures may be referred to as frames, and reference pictures may be referred to as reference frames. Summary of the invention
[0005] In general, the present disclosure describes techniques for sample enhancement techniques performed in-loop with a video decoding process. Specifically, after a block of video data is decoded (whether by a video encoder or a video decoder), one or more of a variety of filtering techniques may be used to enhance the decoded block, such as deblocking filtering, bilateral interpolation filtering, sample adaptive offset filtering, and / or cross-component sample adaptive offset filtering. Virtual boundaries may exist in pictures of a video to allow parallel encoding and / or decoding of pictures. However, a virtual boundary may cross a block of video data, which may hinder filtering when samples need to be accessed on both sides of the virtual boundary. The present disclosure describes various techniques that can be used to allow filtering of a sample (e.g., CCSAO and BIF) when one or more adjacent samples of the sample are along or across a virtual boundary.
[0006] In one example, a method of decoding video data includes: decoding a current block of video data to form a decoded block; determining that a current sample of the decoded block is adjacent to a sample along a virtual boundary in the decoded block and is adjacent to one or more samples that are not along any virtual boundary in the decoded block; calculating band information for cross-component sample adaptive offset (CCSAO) for the current sample using at least one of the one or more samples that are not along any virtual boundary in the decoded block and not using samples along the virtual boundary; and performing CCSAO on the current sample using the band information.
[0007] In another example, a device for decoding video data includes: a memory configured to store video data; and one or more processors implemented in a circuit and configured to: decode a current block of video data to form a decoded block; determine that a current sample of the decoded block is adjacent to a sample along a virtual boundary in the decoded block and is adjacent to one or more samples that are not along any virtual boundary in the decoded block; calculate band information for cross-component sample adaptive offset (CCSAO) for the current sample using at least one of the one or more samples that are not along any virtual boundary in the decoded block and not using samples along the virtual boundary; and perform CCSAO on the current sample using the band information.
[0008] In another example, a computer-readable storage medium having instructions stored thereon that, when executed, cause a processor to: decode a current block of video data to form a decoded block; determine that a current sample of the decoded block is adjacent to a sample along a virtual boundary in the decoded block and to one or more samples that are not along any virtual boundary in the decoded block; calculate band information for cross-component sample adaptive offset (CCSAO) for the current sample using at least one of the one or more samples that are not along any virtual boundary in the decoded block and not using samples along the virtual boundary; and perform CCSAO on the current sample using the band information.
[0009] In another example, an apparatus for decoding video data includes means for decoding a current block of video data to form a decoded block; means for determining that a sample of the decoded block is adjacent to a sample along a virtual boundary in the decoded block and is adjacent to one or more samples that are not along any virtual boundary in the decoded block; means for calculating band information for cross-component sample adaptive offset (CCSAO) for the sample using at least one of the one or more samples that are not along any virtual boundary in the decoded block and not using samples along the virtual boundary; and means for performing CCSAO on the sample using the band information.
[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 be apparent from the description and drawings, and from the claims. BRIEF DESCRIPTION OF THE DRAWINGS
[0011] Figure 1 is a block diagram illustrating an example video encoding and decoding system that may perform the techniques of this disclosure.
[0012] Figure 2 is a conceptual diagram illustrating an example 25-tap filter for a cross-component adaptive loop filtering (CCALF) process.
[0013] Figure 3 is a conceptual diagram illustrating a parallel bilateral filtering (BIF) and sample adaptive offset (SAO) process.
[0014] Figure 4 is a conceptual diagram illustrating an example diamond filter and coefficient naming convention.
[0015] Figure 5 is a conceptual diagram illustrating parallel chroma bilateral filtering (BIF-chroma), sample adaptive offset (SAO), and cross-component sample adaptive offset (CCSAO) processes.
[0016] Figure 6is a flow diagram illustrating an example decoding workflow when cross-component sample adaptive offset (CCSAO) is applied to video data.
[0017] Figure 7 is a conceptual diagram illustrating the relative positions of luma samples and chroma samples for cross-component sample adaptive offset (CCSAO).
[0018] FIG. 8A to FIG. 8D is a conceptual diagram illustrating corresponding direction patterns for edge offset (EO) sample classification.
[0019] Fig. 9 is a conceptual diagram illustrating an example cross-component sample adaptive offset (CCSAO) process in the presence of virtual boundaries in accordance with techniques of this disclosure.
[0020] Fig.10 is a conceptual diagram illustrating an example bilateral filtering (BIF) process in the presence of a virtual boundary according to techniques of this disclosure.
[0021] Fig.11 is a block diagram illustrating an example video encoder that may perform the techniques of this disclosure.
[0022] Fig.12 is a block diagram illustrating an example video decoder that may perform the techniques of this disclosure.
[0023] Fig.13 is a flowchart illustrating an example method for encoding a current block according to the techniques of this disclosure.
[0024] Fig.14 is a flowchart illustrating an example method for decoding a current block according to techniques of this disclosure.
[0025] Fig.15 is a flow chart illustrating an example method of decoding a block of video data and filtering the decoded block of video data in accordance with the techniques of this disclosure. DETAILED DESCRIPTION
[0026] Video coding typically involves partitioning a picture into blocks, such as coding units (CUs), and then coding (encoding or decoding) each of these blocks. Coding a current block typically involves forming a prediction block for the current block, and coding a residual block representing the difference between the original block and the prediction block. Forming the prediction block may include using samples within the current picture (intra-frame prediction) or samples in one or more previously coded reference pictures (inter-frame prediction).
[0027] Both the video encoder and the video decoder decode (i.e., reconstruct) blocks of video data. The video encoder first encodes these blocks and then decodes / reconstructs these blocks for predicting subsequently coded video data blocks. In some cases, after decoding / reconstructing the video data blocks, the video decoder (encoder or decoder) may use one or more techniques (such as adaptive loop filtering, sample adaptive offset, bilateral interpolation, etc.) to enhance the reconstructed blocks.
[0028] In some cases, a video decoder may start decoding video data at a picture that is not the first picture in the order of the video bitstream that includes the video data. For example, a user may have requested to seek or fast forward to a specific time position in the video data, or the user may have tuned to a channel that includes the video data at a time later than the start time of the video data. Such access to video data is generally referred to as "random access". Since the video bitstream may be randomly accessed in this manner, some pictures are used as decoder refresh pictures. That is, some or all of the decoder refresh pictures will not be inter-predicted using previously decoded pictures. In some cases, pictures may be encoded to support "progressive decoder refresh", which includes decoding the first part of the picture until a virtual boundary without using inter-frame prediction, and decoding the second part of the picture beyond the virtual boundary using any decoding mode. This allows these pictures to support random access while also reducing the bit rate of the encoded version of the picture.
[0029] Certain techniques of the present disclosure include performing a cross-component sample adaptive offset (CCSAO) application on a reconstructed block. Specifically, for a current sample (pixel) of a block, a video coder may determine an offset value to apply to the value of the current sample based on the "band" to which the values of neighboring samples of the current sample belong. Bands may also be viewed as categories or classifications, and each band may be associated with a different offset value. The video encoder may signal the offset values of samples to be applied to each of the various bands. The video decoder may then determine the band to which the neighboring samples belong and apply the offset value corresponding to that band to the current sample.
[0030] The present disclosure recognizes that when a sample is located along or near a virtual boundary, not all neighboring samples may be available for the sample (e.g., due to random access). Therefore, according to the techniques of the present disclosure, a video coder (encoder or decoder) may disable CCSAO for samples along a virtual boundary. In addition, the video coder may perform CCSAO on samples near a virtual boundary without considering the values of neighboring samples along the virtual boundary.
[0031] When performing bilateral filtering (BIF), the video decoder uses a diamond-shaped area of neighboring samples to calculate the filter value of the current sample. Such neighboring samples may be referred to as "filter support" samples because the filter coefficients may be mathematically applied to the neighboring samples to calculate the filter value of the current sample. The present disclosure recognizes that when the filter support samples are located on or across a virtual boundary relative to the current sample, the filter support samples may not be available when performing BIF on the current sample. Therefore, according to the techniques of the present disclosure, the video decoder can use other samples located on the same side of the virtual boundary as the current sample to fill in the values of the filter support samples along or across the virtual boundary.
[0032] For adaptive loop filtering (ALF), according to the techniques of this disclosure, the minimum padding size can be increased to, for example, 6 samples. For CCALF, the minimum padding size can be increased to, for example, 4 samples.
[0033] In this way, the techniques of the present disclosure can improve sample enhancement processes such as filtering, SAO, and CCSAO. That is, these techniques allow these various enhancement processing techniques to be performed when using virtual boundaries, thereby further improving the bit rate of the video bitstream while also improving the fidelity (accuracy) of the decoded / reconstructed video data.
[0034] Figure 1 1 is a block diagram illustrating an example video encoding and decoding system 100 that can perform the techniques of the present disclosure. The techniques of the present disclosure generally relate to decoding (encoding and / or decoding) video data. Generally, video data includes any data used to process video. Thus, video data may include original undecoded video, encoded video, decoded (e.g., reconstructed) video, and video metadata, such as signaling data.
[0035] like Figure 1 As shown in , in this example, system 100 includes a source device 102 that provides encoded video data to be decoded and displayed by a destination device 116. Specifically, source device 102 provides video data to destination device 116 via computer-readable medium 110. Source device 102 and destination device 116 may include any of a wide variety of devices, including desktop computers, notebook (i.e., laptop) computers, mobile devices, tablet computers, set-top boxes, handheld phones such as smartphones, televisions, cameras, display devices, digital media players, video game consoles, video streaming devices, broadcast receiver devices, etc. In some cases, source device 102 and destination device 116 may be equipped for wireless communication and may therefore be referred to as wireless communication devices.
[0036] exist Figure 1In the example of , source device 102 includes video source 104, memory 106, video encoder 200 and output interface 108. Destination device 116 includes input interface 122, video decoder 300, memory 120 and display device 118. According to the present disclosure, the video encoder 200 of source device 102 and the video decoder 300 of destination device 116 can be configured to apply techniques for enhancing samples of video data. Therefore, source device 102 represents an example of a video encoding device, and destination device 116 represents an example of a video decoding device. In other examples, source device and destination device may include other components or arrangements. For example, source device 102 may receive video data from an external video source such as an external camera. Similarly, destination device 116 may be docked with an external display device instead of including an integrated display device.
[0037] like Figure 1 The system 100 shown in is only an example. In general, any digital video encoding and / or decoding device can perform techniques for enhancing samples of video data. The source device 102 and the destination device 116 are only examples of such decoding devices, wherein the source device 102 generates decoded video data for sending to the destination device 116. The present disclosure refers to a "decoding" device as a device that performs decoding (encoding and / or decoding) of data. Therefore, the video encoder 200 and the video decoder 300 represent examples of decoding devices, specifically, video encoders and video decoders, respectively. In some examples, the source device 102 and the destination device 116 can operate in a substantially symmetrical manner, so that each of the source device 102 and the destination device 116 includes a video encoding and decoding component. Therefore, the system 100 can support one-way or two-way video transmission between the source device 102 and the destination device 116, for example, for video streaming, video playback, video broadcasting, or video telephony.
[0038] Typically, video source 104 represents the source of video data (i.e., original undecoded video data), and provides a series of pictures (also referred to as "frames") of the order of the video data to video encoder 200, which encodes the data of the pictures. Video source 104 of source device 102 may include a video capture device, such as a camera, a video archive containing previously captured original video, and / or a video feed interface for receiving video from a video content provider. As another alternative, video source 104 may generate computer graphics-based data as source video, or generate a combination of real-time video, archived video, and computer-generated video. In each case, video encoder 200 encodes captured, pre-captured, or computer-generated video data. Video encoder 200 may rearrange pictures from the received order (sometimes referred to as "display order") to a decoding order for decoding. Video encoder 200 may generate a bitstream including encoded video data. Source device 102 may then output the encoded video data onto computer-readable medium 110 via output interface 108 to be received and / or retrieved by, for example, input interface 122 of destination device 116 .
[0039] The memory 106 of the source device 102 and the memory 120 of the destination device 116 represent general purpose memories. In some examples, the memories 106, 120 can store raw video data, for example, raw video from the video source 104 and raw decoded video data from the video decoder 300. Additionally or alternatively, the memories 106, 120 can store software instructions that can be executed by, for example, the video encoder 200 and the video decoder 300, respectively. Although the memory 106 and the memory 120 are shown separately from the video encoder 200 and the video decoder 300 in this example, it should be understood that the video encoder 200 and the video decoder 300 may also include internal memories for functionally similar or equivalent purposes. In addition, the memories 106, 120 can store encoded video data, for example, output from the video encoder 200 and input to the video decoder 300. In some examples, portions of the memories 106, 120 can be allocated as one or more video buffers, for example, to store raw decoded and / or encoded video data.
[0040] The computer-readable medium 110 may represent any type of medium or device capable of transmitting the 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 that enables the source device 102 to directly transmit the encoded video data to the destination device 116 in real time, for example, via a radio frequency network or a computer-based network. According to a communication standard such as a wireless communication protocol, the output interface 108 may modulate the transmission signal including the encoded video data, and the input interface 122 may demodulate the received transmission signal. The communication medium may include any wireless or wired communication medium, such as a radio frequency (RF) spectrum or one or more physical transmission lines. The communication medium may form a portion of a packet-based network such as a local area network, a wide area network, or a global network such as the Internet. The communication medium may include a router, a switch, a base station, or any other equipment that may be useful for facilitating communication from the source device 102 to the destination device 116.
[0041] In some examples, source device 102 may output the encoded data from output interface 108 to storage device 112. Similarly, destination device 116 may access the 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.
[0042] In some examples, source device 102 may output the encoded video data to file server 114 or another intermediate storage device that 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 downloading.
[0043] The file server 114 may be any type of server device capable of storing encoded video data and sending the encoded video data to the destination device 116. The file server 114 may represent a web server (e.g., for a website), a server configured to provide a file delivery protocol service (such as the File Delivery Protocol (FTP) or the 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 an enhanced MBMS (eMBMS) server, and / or a network attached storage (NAS) device. The 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.
[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, 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 discussed above for retrieving or receiving media data from file server 114 or other such protocols for retrieving media data.
[0045] Output interface 108 and input interface 122 may represent wireless transmitters / receivers, modems, wired networking components (e.g., Ethernet cards), wireless communication components that operate according to any of the various IEEE 802.11 standards, or other physical components. In examples where output interface 108 and input interface 122 include wireless components, output interface 108 and input interface 122 may be configured to communicate 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 where output interface 108 includes a wireless transmitter, output interface 108 and input interface 122 may be configured to communicate data (such as encoded video data) according to other wireless standards (such as IEEE 802.11 specifications, IEEE 802.15 specifications (e.g., ZigBee TM ),Bluetooth TMStandards, etc.) to transfer data (such as encoded video data). In some examples, source device 102 and / or destination device 116 may include corresponding system-on-chip (SoC) devices. For example, source device 102 may include a SoC device for performing functionality belonging to video encoder 200 and / or output interface 108, and destination device 116 may include a SoC device for performing functionality belonging to video decoder 300 and / or input interface 122.
[0046] The techniques disclosed herein may be applied to video decoding to support any of a variety of multimedia applications, such as over-the-air television broadcasting, cable television transmission, satellite television transmission, Internet streaming video transmission (such as Dynamic Adaptive Streaming over HTTP (DASH)), digital video encoded onto a data storage medium, decoding of digital video stored on a data storage medium, or other applications.
[0047] The input interface 122 of the destination device 116 receives an encoded video bitstream from the computer-readable medium 110 (e.g., a communication medium, a storage device 112, a file server 114, etc.). The encoded video bitstream may include signaling information defined by the video encoder 200 and also used by the video decoder 300, such as syntax elements with values describing characteristics and / or processing of video blocks or other decoding units (e.g., slices, pictures, groups of pictures, sequences, etc.). The display device 118 displays decoded pictures 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.
[0048] Despite Figure 1 Not shown, but in some examples, the video encoder 200 and the video decoder 300 can both be integrated with an audio encoder and / or an audio decoder and can include appropriate MUX-DEMUX units or other hardware and / or software to handle multiplexed streams including both audio and video in a common data stream.
[0049] The video encoder 200 and the video decoder 300 can each be implemented as any of a variety of suitable encoder and / or decoder circuits, such as one or more microprocessors, digital signal processors (DSPs), application specific integrated circuits (ASICs), field programmable gate arrays (FPGAs), discrete logic, software, hardware, firmware, or any combination thereof. When the technology is partially implemented in software, the device can store instructions for the software in an appropriate non-transitory computer-readable medium, and use one or more processors to execute the instructions in hardware to perform the technology of the present disclosure. Each of the video encoder 200 and the video decoder 300 can be included in one or more encoders or decoders, any of which can be integrated as part of a combined encoder / decoder (codec) in a corresponding device. A device including the video encoder 200 and / or the video decoder 300 may include an integrated circuit, a microprocessor, and / or a wireless communication device (such as a cellular phone).
[0050] The video encoder 200 and the video decoder 300 may operate according to a video coding standard such as ITU-T H.265 (also known as High Efficiency Video Coding (HEVC)) or an extension thereof such as multi-view and / or scalable video coding extensions. Alternatively, the video encoder 200 and the video decoder 300 may operate according to other proprietary or industry standards such as ITU-T H.266, also known as Versatile Video Coding (VVC). In other examples, the video encoder 200 and the video decoder 300 may operate according to a proprietary video codec / format such as AOMedia Video 1 (AV1), an extension of AV1, and / or a subsequent version of AV1 (e.g., AV2). In other examples, the video encoder 200 and the video decoder 300 may operate according to other proprietary formats or industry standards. However, the techniques of the present disclosure are not limited to any particular coding standard or format. In general, the video encoder 200 and the video decoder 300 may be configured to perform the techniques of the present disclosure in conjunction with any video coding technique that includes samples of enhanced video data.
[0051] Typically, the video encoder 200 and the video decoder 300 may perform block-based decoding of a picture. The term "block" generally refers to a structure that includes data to be processed (e.g., to be encoded, decoded, or otherwise used in an encoding and / or decoding process). For example, a block may include a two-dimensional matrix of samples of luminance and / or chrominance data. Typically, the video encoder 200 and the video decoder 300 may decode video data represented in a YUV (e.g., Y, Cb, Cr) format. That is, instead of decoding red, green, and blue (RGB) data for samples of a picture, the video encoder 200 and the video decoder 300 may decode luminance components and chrominance components, wherein the chrominance components may include both red hue chrominance components and blue hue chrominance components. In some examples, the video encoder 200 converts the received RGB format data to a YUV representation before encoding, and the video decoder 300 converts the YUV representation to an RGB format. Alternatively, a pre-processing and post-processing unit (not shown) may perform these conversions.
[0052] The present disclosure may generally relate to the decoding (e.g., encoding and decoding) of a picture to include the process of encoding or decoding data of the picture. Similarly, the present disclosure may relate to the decoding of a block of a picture to include the process of encoding or decoding data for the block (e.g., prediction and / or residual decoding). The encoded video bitstream generally includes a series of values of syntax elements for representing decoding decisions (e.g., decoding modes) and partitioning of pictures into blocks. Therefore, references to the decoding of a picture or a block should generally be understood as the decoded values of the syntax elements forming the picture or block.
[0053] HEVC defines various blocks, including coding units (CUs), prediction units (PUs), and transform units (TUs). According to HEVC, a video decoder (such as the video encoder 200) divides a coding tree unit (CTU) into CUs according to a quadtree structure. That is, the video decoder divides the CTU and the CU into four equal, non-overlapping squares, and each node of the quadtree has zero or four child nodes. A node without a child node 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 decoder may further divide the PU and TU. For example, in HEVC, a residual quadtree (RQT) represents the division of a TU. In HEVC, a PU represents inter-frame prediction data, and a TU represents residual data. The intra-predicted CU includes intra-frame prediction information, such as an intra-frame mode indication.
[0054] As another example, the video encoder 200 and the video decoder 300 may be configured to operate according to VVC. According to VVC, a video decoder (such as the video encoder 200) divides a picture into a plurality of coding tree units (CTUs). The video encoder 200 may divide the CTU according to a tree structure (such as a quadtree-binary tree (QTBT) structure or a multi-type tree (MTT) structure). The QTBT structure removes the concept of multiple partition types, such as the separation between CU, PU, and TU of HEVC. The QTBT structure includes two levels: a first level divided according to quadtree partitions, and a second level divided according to binary tree partitions. The root node of the QTBT structure corresponds to the CTU. The leaf nodes of the binary tree correspond to coding units (CUs).
[0055] In the MTT partition structure, blocks can be partitioned using quadtree (QT) partitioning, binary tree (BT) partitioning, and one or more types of ternary tree (TT) (also known as ternary tree (TT)) partitioning. A ternary tree or ternary tree partition is a partition in which a block is divided into three sub-blocks. In some examples, the ternary tree or ternary tree partition divides the block into three sub-blocks without dividing the original block through the center. The partition types in MTT (e.g., QT, BT, and TT) can be symmetric or asymmetric.
[0056] When operating according to the AV1 codec, the video encoder 200 and the video decoder 300 may be configured to decode the video data in blocks. In AV1, the largest decoding block that can be processed is called a super block. In AV1, a super block can be 128x128 luminance samples or 64x64 luminance samples. However, in subsequent video decoding formats (e.g., AV2), super blocks may be defined by different (e.g., larger) luminance sample sizes. In some examples, the super block is the top layer of the block quadtree. The video encoder 200 may further divide the super block into smaller decoding blocks. The video encoder 200 may use square or non-square partitions to divide super blocks and other decoding blocks into smaller blocks. Non-square blocks may include N / 2xN blocks, NxN / 2 blocks, N / 4xN blocks, and NxN / 4 blocks. The video encoder 200 and the video decoder 300 may perform separate prediction and transform processing on each decoding block.
[0057] AV1 also defines tiles of video data. A tile is a rectangular array of super blocks that can be decoded independently of other tiles. That is, the video encoder 200 and the video decoder 300 can encode and decode coded blocks within a tile, respectively, without using video data from other tiles. However, the video encoder 200 and the video decoder 300 can perform filtering across tile boundaries. The size of the tiles can be uniform or non-uniform. Tile-based decoding can enable parallel processing and / or multi-threading specifically implemented by the encoder and decoder.
[0058] In some examples, the video encoder 200 and the video decoder 300 may use a single QTBT or MTT structure to represent each of the luma component and the chroma components, while in other examples, the video encoder 200 and the video decoder 300 may use two or more QTBT or MTT structures, such as one QTBT / MTT structure for the luma component and another QTBT / MTT structure for the two chroma components (or two QTBT / MTT structures for the corresponding chroma components).
[0059] The video encoder 200 and the video decoder 300 may be configured to use quadtree partitioning, QTBT partitioning, MTT partitioning, super block partitioning, or other partitioning structures.
[0060] In some examples, a CTU includes a coding tree block (CTB) of luma samples, two corresponding CTBs of chroma samples of a picture with three sample arrays, or a CTB of samples of a monochrome picture or a picture coded using three separate color planes and syntax structures for coding the samples. A CTB may be an NxN block of samples for some N value, such that a partitioning is to split the components into CTBs. A component may be an array or a single sample from one of the three arrays (luminance and two chroma) for a 4:2:0, 4:2:2, or 4:4:4 color format picture, or an array or a single sample of an array for a monochrome format picture. In some examples, a coding block is an MxN block of samples for some M and N values, such that a partitioning is to split the CTB into coding blocks.
[0061] Blocks (e.g., CTUs or CUs) may be grouped in a picture in various ways. As an example, a brick may refer to a rectangular area of a CTU row within a particular tile in a picture. A tile may be a rectangular area of a CTU within a particular tile column and a particular tile row in a picture. A tile column refers to a rectangular area of a CTU having a height equal to the height of the picture and a width specified by a syntax element (e.g., such as in a picture parameter set). A tile row refers to a rectangular area of a CTU having a height specified by a syntax element (e.g., such as in a picture parameter set) and a width equal to the width of the picture.
[0062] In some examples, a tile may be divided into multiple bricks, each of which may include one or more CTU rows within the tile. Tiles that are not divided into multiple bricks may also be referred to as bricks. However, bricks that are true subsets of tiles may not be referred to as tiles. Bricks in a picture may also be arranged in slices. A slice may be an integer number of bricks of a picture that may be uniquely contained in a single network abstraction layer (NAL) unit. In some examples, a slice includes multiple complete tiles or a continuous sequence of complete bricks that include only one tile.
[0063] The present disclosure may use "NxN" and "N times N" interchangeably to refer to the sample size of a block (such as a CU or other video block) in terms of the vertical and horizontal dimensions, for example, 16x16 samples or 16 times 16 samples. Typically, a 16x16 CU will have 16 samples in the vertical direction (y=16) and 16 samples in the horizontal direction (x=16). Similarly, an NxNCU typically has N samples in the vertical direction and N samples in the horizontal direction, where N represents a non-negative integer value. The samples in a CU may be arranged in rows and columns. In addition, a CU does not necessarily need to have the same number of samples in the horizontal direction as in the vertical direction. For example, a CU may include NxM samples, where M is not necessarily equal to N.
[0064] The video encoder 200 encodes video data representing prediction and / or residual information and other information for a CU. The prediction information indicates how to predict the CU in order to form a prediction block for the CU. The residual information generally represents the sample-by-sample difference between the samples of the CU before encoding and the prediction block.
[0065] In order to predict a CU, the video encoder 200 may generally form a prediction block of the CU by inter-frame prediction or intra-frame prediction. Inter-frame prediction generally refers to predicting a CU based on data of a previously decoded picture, while intra-frame prediction generally refers to predicting a CU based on previously decoded data of the same picture. In order to perform inter-frame prediction, the video encoder 200 may use one or more motion vectors to generate a prediction block. The video encoder 200 may generally perform a motion search to identify a reference block that closely matches the CU, for example, based on the difference between the CU and the reference block. The video encoder 200 may calculate a difference metric using the sum of absolute differences (SAD), the sum of squared differences (SSD), the mean absolute difference (MAD), the mean squared difference (MSD), or other such difference calculations to determine whether the reference block closely matches the current CU. In some examples, the video encoder 200 may use unidirectional prediction or bidirectional prediction to predict the current CU.
[0066] Some examples of VVC also provide an affine motion compensation mode, which can be considered an inter-frame prediction mode. In the affine motion compensation mode, the video encoder 200 can determine two or more motion vectors representing non-translational motion (such as zooming in or out, rotation, perspective motion, or other irregular motion types).
[0067] To perform intra prediction, the video encoder 200 may select an intra prediction mode to generate a prediction block. Some examples of VVC provide sixty-seven intra prediction modes, including various directional modes, as well as planar modes and DC modes. Typically, the video encoder 200 selects an intra prediction mode that describes neighboring samples of a current block (e.g., a block of a CU) from which to predict samples of the current block. Assuming that the video encoder 200 decodes CTUs and CUs in raster scan order (from left to right, from top to bottom), such samples may typically be located above, above left, or to the left of the current block in the same picture as the current block.
[0068] The video encoder 200 encodes data representing the prediction mode of the current block. For example, for inter-frame prediction mode, the video encoder 200 may encode data indicating which of various available inter-frame prediction modes is used and motion information of the corresponding mode. For example, for unidirectional or bidirectional inter-frame prediction, the video encoder 200 may encode motion vectors using advanced motion vector prediction (AMVP) or merge mode. The video encoder 200 may use a similar mode to encode motion vectors for affine motion compensation mode.
[0069] AV1 includes two general techniques for encoding and decoding coded blocks of video data. The two general techniques are intra prediction (e.g., intra prediction or spatial prediction) and inter prediction (e.g., inter prediction or temporal prediction). In the context of AV1, when an intra prediction mode is used to predict a block of a current frame of video data, the video encoder 200 and the video decoder 300 do not use video data from other frames of the video data. For most intra prediction modes, the video encoder 200 encodes a block of the current frame based on the difference between the sample values in the current block and the prediction values generated from the reference samples in the same frame. The video encoder 200 determines the prediction values generated from the reference samples based on the intra prediction mode.
[0070] After prediction (such as intra-frame prediction or inter-frame prediction for a block), the video encoder 200 can calculate residual data for the block. The residual data (such as a residual block) represents the sample-by-sample difference between the block and a prediction block for the block, which is formed using a corresponding prediction mode. The video encoder 200 can apply one or more transforms to the residual block to produce transformed data in a transform domain rather than in a sample domain. For example, the video encoder 200 can apply a discrete cosine transform (DCT), an integer transform, a wavelet transform, or a conceptually similar transform to the residual video data. Additionally, the video encoder 200 can apply a secondary transform after the first transform, such as a mode-dependent non-separable secondary transform (MDNSST), a signal-dependent transform, a Karhunen-Loeve transform (KLT), etc. The video encoder 200 generates transform coefficients after applying one or more transforms.
[0071] As noted above, after any transforms that produce 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 transform coefficients. For example, the video encoder 200 may round down 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 bit-by-bit right shift of the value to be quantized.
[0072] After quantization, the video encoder 200 may scan the transform coefficients to generate a one-dimensional vector according to a two-dimensional matrix including the quantized transform coefficients. The scan may be designed to place the transform coefficients of higher energy (and therefore lower frequency) in front of the vector and the transform coefficients of lower energy (and therefore higher frequency) in the back of the vector. In some examples, the video encoder 200 may scan the quantized transform coefficients using a predefined scan order 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 the values of the syntax elements describing the metadata associated with the encoded video data, which is used by the video decoder 300 when decoding the video data.
[0073] To perform CABAC, the video encoder 200 may assign context within a context model to a symbol to be transmitted. The context may relate to, for example, whether neighboring values of the symbol are zero values. The probability determination may be based on the context assigned to the symbol.
[0074] The video encoder 200 may further generate syntax data, such as block-based syntax data, picture-based syntax data, and sequence-based syntax data, for example in a picture header, a block header, a slice header, or generate other syntax data such as a sequence parameter set (SPS), a picture parameter set (PPS), or a video parameter set (VPS) to the video decoder 300. The video decoder 300 may also decode such syntax data to determine how to decode the corresponding video data.
[0075] In this way, the video encoder 200 can generate a bitstream including encoded video data, for example, a syntax element describing the partition of a picture into blocks (e.g., CUs) and prediction and / or residual information for the blocks. Finally, the video decoder 300 can receive the bitstream and decode the encoded video data.
[0076] In general, the video decoder 300 performs a process that is the reverse of the process performed by the video encoder 200 to decode the encoded video data of the bitstream. For example, the video decoder 300 may decode the values of the syntax elements for the bitstream using CABAC in a manner substantially similar to but reverse to the CABAC encoding process of the video encoder 200. The syntax elements may define partition information for partitioning a picture into CTUs and partitioning each CTU according to a corresponding partition structure such as a QTBT structure to define CUs of the CTUs. The syntax elements may further define prediction and residual information for a block of video data (e.g., a CU).
[0077] The residual information may be represented by, for example, quantized transform coefficients. The video decoder 300 may inverse quantize and inverse transform the quantized transform coefficients of the block to reproduce a residual block for the block. The video decoder 300 uses the signaled prediction mode (intra-frame prediction or inter-frame prediction) and related prediction information (e.g., motion information for inter-frame prediction) to form a prediction block for the block. The video decoder 300 may then combine the prediction block and the residual block (on a sample-by-sample basis) to reproduce the original block. The video decoder 300 may perform additional processing, such as performing a deblocking process to reduce visual artifacts along the boundaries of the blocks.
[0078] The present disclosure may generally involve "signaling" certain information (such as syntax elements). The term "signaling" may generally refer to the communication of values of syntax elements and / or other data used to decode encoded video data. That is, video encoder 200 may signal values of syntax elements in a bitstream. Generally, signaling refers to generating a value in a bitstream. As noted above, source device 102 may transmit the bitstream to destination device 116 in substantially real time or in non-real time (such as may occur when storing syntax elements to storage device 112 for subsequent retrieval by destination device 116).
[0079] After decoding (also called "reconstructing") a block of video data, the video encoder 200 and the video decoder 300 may enhance the samples of the block using one or more of a variety of techniques, such as sample adaptive offset (SAO), cross-component sample adaptive offset (CCSAO), or filtering (such as adaptive loop filtering (ALF), boundary filtering, cross-component adaptive loop filtering (CCALF), etc.).
[0080] The enhanced compression model (ECM) for video coding includes cross-component SAO (CCSAO) and bilateral filtering (BIF). Sample adaptive offset (SAO), CCSAO and BIF operate in parallel in the ECM. In addition, the adaptive loop filter (ALF) maximum filter size footprint is increased to a 13×13 diamond shape. In addition, the cross-component ALF (CCALF) footprint (filter size) has also been increased to a 25-tap long filter.
[0081] In VVC, the concept of virtual boundary (VB) processing for in-loop filters is used to deactivate the application of in-loop filters on discontinuous edges (e.g., in 360-degree video). The basic concept of virtual boundary processing is that samples across a given virtual boundary are considered unavailable for processing samples on the other side of the virtual boundary. Thus, when filtering samples to the right of a vertical virtual boundary, all samples to the left of the "vertical virtual boundary" are considered unavailable for filtering purposes. Similarly, for horizontal boundaries, all samples above the horizontal virtual boundary are considered unavailable for filtering purposes for samples below the horizontal virtual boundary.
[0082] In VVC, virtual boundary processing is applied to both SAO and ALF. For SAO Band Offset (BO), no pre-processing or filtering changes are required, because the "band" information is determined entirely based on the current sample being filtered. Therefore, for SAO BO, there is no dependency on other neighboring samples. However, for SAO Edge Offset (EO), four 1D directions (spatial neighbors) are checked, and in the case where a given sample falls on a virtual boundary or its neighboring samples (based on the EO direction) fall outside the boundary, filtering of the sample is disabled. For ALF in VVC, virtual boundary processing is done by "repeated padding" to replace unavailable samples.
[0083] In addition, VVC also supports a functionality called Progressive Decoding Refresh (GDR). To implement GDR functionality, VVC disables loop filtering across virtual boundaries.
[0084] However, the techniques of this disclosure allow for virtual boundary (VB) processing for loop filter stages including BIF and CCSAO. These techniques also include modifications to the virtual boundary (VB) processing for ALF and CCALF.
[0085] To filter the luma samples, three different classifiers (C0, C1, and C2) and three different sets of filters (F0, F1, and F2) are used. Sets F0 and F1 contain fixed filters with coefficients trained for classifiers C0 and C1. The coefficients of the filters in F2 are signaled. i Which filter to use for a given sample is determined by the classifier C i The class C assigned to this sample i decided.
[0086] First, two 13×13 diamond fixed filters F0 and F1 are applied to derive two intermediate samples R0(x,y) and R1(x,y). Afterwards, F2 is applied to R0(x,y), R1(x,y) and adjacent samples to derive the filtered samples as:
[0087]
[0088] where f i,j is the clipping difference between the adjacent sample and the current sample R(x,y), and g i YesR i-20 The clipped difference between (x,y) and the current sample. Signaling the filter coefficients c i , i=0,…21.
[0089] Based on the directionality D i and activity Class C iAssign to each 2×2 block:
[0090]
[0091] Among them, M D,i Indicates directionality D i The total number of .
[0092] As in VVC, the values of horizontal, vertical, and two diagonal gradients are calculated for each sample using a 1-D Laplacian operator. The sum of the sample gradients within a 4×4 window covering the target 2×2 block is used for classifier C0, and the sum of the sample gradients within a 12×12 window is used for classifiers C1 and C2. The sum of the horizontal, vertical, and two diagonal gradients are expressed as and Directionality D i is determined by comparing the following formula to a set of thresholds:
[0093]
[0094] Directivity D2 is derived as in VVC using thresholds 2 and 4.5. For D0 and D1, first calculate the horizontal / vertical edge strength and diagonal edge strength Use threshold Th = [1.25, 1.5, 2, 3, 4.5, 8]. In the case of is 0; otherwise, is the largest integer such that exist In the case of is 0; otherwise, is the largest integer such that when That is, when horizontal / vertical edges dominate, D is derived by using Table 1(a) i ; Otherwise, the diagonal edges dominate, and D is derived by using Table 1(b) i :
[0095] Table 1
[0096]
[0097] To obtain The sum of the vertical and horizontal gradients A i Mapped to the range 0 to n, where n is is equal to 4, and for and For example, it is equal to 15.
[0098] In ALF_APS, up to 4 luma filter sets are signaled, each set may have up to 25 filters.
[0099] The classification in ALF is extended with additional alternative classifiers. For a signaled luma filter set, a flag is signaled to indicate whether the alternative classifier is applied. The geometric transformation is not applied to the alternative band classifier. When applying a band-based classifier, the sum of the sample values of the 2×2 luma block is first calculated. Then, the class index is calculated as follows:
[0100] class_index = (sum * 25) >> (sample bit depth + 2)
[0101] Figure 2 is a conceptual diagram illustrating an example 25-tap filter 130 for a cross-component adaptive loop filtering (CCALF) process. The CCALF process uses a linear filter to filter luma sample values and generate residual corrections for chroma samples. Figure 2 An example 25-tap filter 130 may be used in a CCALF process. For a given slice, the video encoder 200 may collect statistics for the slice, analyze the statistics, and signal up to 16 filters using an adaptive parameter set (APS). Each slice may signal an APS ID that indicates which APS will be used to decode the slice, and therefore which filters will be used to filter the data for the slice when performing CCALF.
[0102] Figure 3 1 is a conceptual diagram illustrating a parallel bilateral filtering (BIF) 134 process and a sample adaptive offset (SAO) process 136. Initially, a deblocking operation is performed, thereby generating deblocked samples 132. The filtering of the deblocked samples 132 may be performed in an in-loop filter stage including the SAO process 136 and the BIF process 134, such as Figure 3 As shown. Both the BIF process 134 and the SAO process 136 can use the deblocked samples as input. Each filter creates an offset for each sample and can add these offsets to the input samples. The resulting samples can then be cropped by a cropping unit 138 to form cropped samples 140, which can be passed to an adaptive loop filter (ALF) 142.
[0103] In detail, the output sample I can be obtained as follows: OUT :
[0104] I OUT =clip3(I C +ΔI BIF +ΔI SAO ) (Formula 1)
[0105] Among them I C is the input sample from deblocking, ΔI BIF is the offset from the bilateral filter, and ΔI SAO is the offset from SAO.
[0106] This implementation provides the encoder with the possibility to enable or disable filtering at CTU and slice level.The video encoder 200 may make the decision by evaluating the rate-distortion optimization (RDO) cost.
[0107] Figure 4 is a conceptual diagram illustrating an example diamond filter 144 and coefficient naming conventions. For a CTU being filtered, the filtering process may proceed as follows.
[0108] At picture boundaries, when samples are not available (e.g., because diamond filter 144 is centered on picture boundary samples), the bilateral filter may use expansion (sample repetition) to fill in the values of the unavailable samples. For virtual boundaries, the behavior is conventionally the same as SAO, i.e., no filtering occurs. When crossing horizontal CTU boundaries, the bilateral filter may access the same samples that SAO can access. As an example, if the center sample I C (according to Figure 4 ) is located in the first row of CTU, then just like SAO, read I from the CTU above NW ,I A and I NE , but fill I AA , so no additional line buffer is required compared to the following document: Strom et al., “CE5-3.1 Combination of bilateral filter and SAO,” ITU-T SG 16WP 3 and ISO / IEC JTC 1 / SC 29 / WG 11 Joint Video Experts Group (JVET) 16th Meeting, Geneva, CH, October 1-11, 2019, document No. JVET-P0073_v3 (hereinafter referred to as “JVET-P0073”).
[0109] Center Sample I C The surrounding samples are based on Figure 4 denoted by A, B, L, and R, where A, B, L, and R represent up, down, left, and right, and where NW, NE, SW, SE represent northwest, etc. Similarly, AA represents up-up, BB represents down-down, etc. This diamond shape is different from JVET-P0073, which uses square filter supports and does not use I AA ,I BB ,I LL or I RR .
[0110] Each surrounding sample I A ,I R etc. will contribute the corresponding modifier value etc. These modifier values are calculated as follows: From the contribution of the right sample I R To begin, the difference is calculated as follows:
[0111] ΔI R =(|I R -I C |+4)>>3 (Formula 2)
[0112] where |·| represents the absolute value. For data other than 10 bits, ΔI can be used instead. R =(|I R -I C |+2 n -6 )>>(n-7), where n=8 for 8-bit data, etc. The resulting value is then clipped so that it is less than 16:
[0113] i R =min(15,ΔI R ) (Formula 3)
[0114] The modifier value is then calculated as follows:
[0115]
[0116] Among them, LUT 行 [] is a 16-value array determined by the value of qpb=clip(0,25,QP+bilateral_filter_qp_offset-17):
[0117] {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0} (if qpb=0)
[0118] {0,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0} (if qpb=1)
[0119] {0,2,2,2,1,1,0,1,0,0,0,0,0,0,0,0} (if qpb=2)
[0120] {0,2,2,2,2,1,1,1,1,1,1,1,0,1,1,-1} (if qpb=3)
[0121] {0,3,3,3,2,2,1,2,1,1,1,1,0,1,1,-1} (if qpb=4)
[0122] {0,4,4,4,3,2,1,2,1,1,1,1,0,1,1,-1} (if qpb=5)
[0123] {0,5,5,5,4,3,2,2,2,2,2,1,0,1,1,-1} (if qpb=6)
[0124] {0,6,7,7,5,3,3,3,3,2,2,1,1,1,1,-1} (if qpb=7)
[0125] {0,6,8,8,5,4,3,3,3,3,3,2,1,2,2,-2} (if qpb=8)
[0126] {0,7,10,10,6,4,4,4,4,3,3,2,2,2,2,-2} (if qpb=9)
[0127] {0,8,11,11,7,5,5,4,5,4,4,2,2,2,2,-2} (if qpb=10)
[0128] {0,8,12,13,10,8,8,6,6,6,5,3,3,3,3,-2} (if qpb=11)
[0129] {0,8,13,14,13,12,11,8,8,7,7,5,5,4,4,-2} (if qpb=12)
[0130] {0,9,14,16,16,15,14,11,9,9,8,6,6,5,6,-3} (if qpb=13)
[0131] {0,9,15,17,19,19,17,13,11,10,10,8,8,6,7,-3} (if qpb=14)
[0132] {0,9,16,19,22,22,20,15,12,12,11,9,9,7,8,-3} (if qpb=15)
[0133] {0,10,17,21,24,25,24,20,18,17,15,12,11,9,9,-3} (if qpb=16)
[0134] {0,10,18,23,26,28,28,25,23,22,18,14,13,11,11,-3} (if qpb=17)
[0135] {0,11,19,24,29,30,32,30,29,26,22,17,15,13,12,-3} (if qpb=18)
[0136] {0,11,20,26,31,33,36,35,34,31,25,19,17,15,14,-3} (if qpb=19)
[0137] {0,12,21,28,33,36,40,40,40,36,29,22,19,17,15,-3} (if qpb=20)
[0138] {0,13,21,29,34,37,41,41,41,38,32,23,20,17,15,-3} (if qpb=21)
[0139] {0,14,22,30,35,38,42,42,42,39,34,24,20,17,15,-3} (if qpb=22)
[0140] {0,15,22,31,35,39,42,42,43,41,37,25,21,17,15,-3} (if qpb=23)
[0141] {0,16,23,32,36,40,43,43,44,42,39,26,21,17,15,-3} (if qpb=24)
[0142] {0,17,23,33,37,41,44,44,45,44,42,27,22,17,15,-3} (if qpb=25)
[0143] This differs from JVET-P0073, where 5 such tables were used and the same table was reused for several qp values.
[0144] As described in JVET-N0493 section 3.1.3, these values can be stored using six bits per entry, resulting in 26*16*6 / 8 = 312 bytes, or 300 bytes (if the first row of all zeros is excluded).
[0145] In the same way according to I L ,I A and I B calculate and For diagonal samples I NW ,I NE ,I SE ,I SWAnd sample I two steps away AA ,I BB ,I RR and I LL , the calculation also follows formulas 2 and 3, but uses values shifted by 1. Using diagonal samples I SE As an example:
[0146]
[0147] And the other diagonal samples and samples beyond two steps are calculated in the same way. Add the modifier values together:
[0148]
[0149] Note that for the previous sample, equal Similarly, for the above sample,
[0150] equal And similar symmetries can be found for the modifier values diagonally and two steps away. This means that in the hardware implementation, six values are calculated and is sufficient, and the remaining six values can be obtained from the previously calculated values.
[0151] m 总和 The value is now multiplied by c = 1, 2, or 3, which can be done using a single adder and a logic AND gate as follows:
[0152] c v =k1&(m 总和 <<1)+k2&m 总和 , (Formula 7)
[0153] Where & represents logical AND, and k1 is the most significant bit of the multiplier c, and k2 is the least significant bit. The value multiplied by it is obtained using the minimum block size D=min(width, height), as shown in Table 2:
[0154] Table 2
[0155] Block Type D≤4 4<D<16 D≥16 Intra 3 2 1 Interframe 2 2 1
[0156] Finally, calculate the bilateral filter offset ΔI BIF . For full strength filtering:
[0157] ΔI BIF =(c v +16)>>5, (Formula 8)
[0158] And for half-intensity filtering:
[0159] ΔI BIF =(c v +32)>>6. (Formula 9)
[0160] The general formula for n-bit data is:
[0161]
[0162] where bilateral_filter_strength can be 0 or 1 and is signaled in the PPS.
[0163] Figure 5 1 is a conceptual diagram illustrating a parallel chroma bilateral filtering (BIF-chroma) process 152, a sample adaptive offset (SAO) process 154, and a cross-component sample adaptive offset (CCSAO) process 156. Like BIF-luminance, the BIF-chroma process 152 can also be performed in parallel with the SAO process 154 and the CCSAO process 156, as shown in FIG. Figure 5 As shown. The BIF-chroma process 152, CCSAO process 156 and SAO process 154 can use the same deblocked chroma samples 150 produced by the deblocking filter as input and generate three offsets for each chroma sample in parallel. These three offsets can then be added to the input chroma sample to obtain a sum, which is then clipped by the clipping unit 158 to form the final output chroma sample value. The proposed BIF-chroma provides an on / off control mechanism at both the CTU level and the slice level.
[0164] The filtering process of BIF-chroma is similar to that of BIF-luminance. For chroma samples, a 5×5 diamond filter is used to generate the filtering offset. The difference between the center sample and each surrounding sample is first calculated. The coefficient of each reference sample is extracted from the predefined lookup table directly based on the calculated difference. The coefficients for the chroma components are retrained and are different from the coefficients from BIF-luminance. In the BIF-luminance design, the block-level filtering strength parameter c is determined based on the luminance TU size and CU mode. In the BIF-chroma design, when dual-tree partitioning is enabled for the current slice, the parameters of the chroma components are determined based on the chroma TU size and mode, and when dual-tree partitioning is disabled, the parameters of the chroma components are determined based on the corresponding luminance TU size and mode.
[0165] Figure 6is a flow chart illustrating an example decoding workflow 160 when cross-component sample adaptive offset (CCSAO) is applied to video data. Similar to the SAO process, the CCSAO process classifies reconstructed samples into different categories, derives an offset appropriately for each category, and adds the offset to the reconstructed samples in the category. However, unlike the SAO process, which uses a single luma / chroma component of the current sample as input, the CCSAO process utilizes all three components (blue chroma, red chroma, and luma) to classify the current sample into different categories. To facilitate parallel processing, the output samples from the deblocking filter are used as input to the CCSAO.
[0166] In the current CCSAO design, in order to achieve a better complexity / performance tradeoff, only BO is used to enhance the quality of the reconstructed samples. For a given luma / chroma sample, three candidate samples are selected to classify the given sample into different categories: one co-located Y sample, one co-located U sample, and one co-located V sample. The sample values of these three selected samples are then classified into three different {band Y ,frequency band U ,frequency band V} band, and the joint index i is used to indicate the class of a given sample. An offset is signaled and added to the reconstructed samples belonging to that class, which can be formulated as follows:
[0167]
[0168] Figure 7 is a conceptual diagram illustrating the relative positions of luma samples and chroma samples for the cross-component sample adaptive offset (CCSAO) process. In the above formula (11), {Y col ,U col ,V col} are the three selected co-site samples used to classify the current sample; { Y ,N U ,N V} are respectively applied to {Y col ,U col ,V col} The average number of divided frequency bands of the full range; BD is the internal decoding bit depth; C rec and C r ' ec are the reconstructed samples before and after applying CCSAO; σ CCSAO [I] is the value of the CCSAO offset applied to the i-th BO category. In the current design, the co-located luma samples can be selected from 9 candidate positions, while the co-located chroma sample positions are fixed, such as Figure 7 As depicted in .
[0169] Similar to SAO, different classifiers can be applied to different local areas to further enhance the overall picture quality. The parameters of each classifier (e.g., position Y) are signaled at the frame level. col 、N Y 、N U 、N V and offset), and explicitly signal and switch which classifier to use at the CTB level. For each classifier, {N Y ,N U ,N V The maximum value of} is set to {16, 4, 4}, and the offset is constrained to be in the range [-15, 15]. The maximum number of classifiers per frame is constrained to 4.
[0170] FIG. 8A to FIG. 8D is a conceptual diagram illustrating corresponding direction patterns for edge offset (EO) sample classification. Fig. 8A depicts a horizontal mode 162A, Figure 8B Depicting the vertical mode 162B, Figure 8C depicts right diagonal pattern 162C, and Fig.8D A left diagonal pattern 162D is depicted. The SAO filter attempts to reduce undesirable visual artifacts, including ringing artifacts, which can become more severe with large transforms and longer tap interpolation filters. The SAO filter attempts to reduce the average distortion between the original and reconstructed samples by first classifying the reconstructed samples into different classes, obtaining an offset for each class, and then adding the offset to each sample of the class without signaling the location of the sample to be corrected.
[0171] Depending on the sample classification, the SAO filter can use different offsets on a sample-by-sample basis in a region and adapt the SAO parameters as the region changes. The two types of SAO used in ECM-2.0 are edge offset (EO) and band offset (BO). For EO, sample classification is based on the comparison between the current sample and adjacent samples. For BO, sample classification is based on sample values. Note that each color component can have its own SAO parameters. To achieve low encoding latency and reduce buffer requirements, the region size is fixed to one CTB. To reduce side information, multiple CTUs can be merged together to share SAO parameters.
[0172] EO uses four 1-D orientation modes for sample classification: horizontal, vertical, 135° diagonal, and 45° diagonal, e.g. FIG. 8A to FIG. 8D As shown, label “C” represents the current sample, and labels “A” and “B” represent two corresponding adjacent samples.
[0173] According to the above mode, four EO classes are specified, and an EO class corresponds to one mode. The video encoder 200 may select an EO class for each EO-enabled CTB. Based on rate-distortion optimization, the video encoder 200 may select and send data indicating the best EO class in the bitstream as side information. Since the mode is 1-D, the result of the classifier does not exactly correspond to extreme samples.
[0174] For a given EO class, each sample within the CTB is classified into one of five categories. The current sample value, labeled "C", is compared with its two neighbors along the selected 1-D pattern. The classification rules for each sample are summarized in Table 3 below:
[0175] Table 3
[0176] Sample classification rules for edge shift
[0177] category condition 1 c<a&&c<b 2 (c<a&&c==b)||(c==a&&c<b) 3 (c>a&&c==b)||(c==a&&c>b) 4 c>a&&c>b 0 None of the above
[0178] Band offset (BO) means adding an offset to all samples of the same band. The sample value range is equally divided into 32 bands. For 8-bit samples in the range of 0 to 255, the width of the band can be 8, and sample values from 8k to 8K+7 belong to band k, where k can be in the range of 0 to 31. The video encoder 200 can signal the average difference between the original samples and the reconstructed samples in the band (i.e., the offset of the band) to the video decoder 300. There is no constraint on the offset sign. The offset and starting band position of four consecutive bands can be signaled to the video decoder 300.
[0179] Fig. 9 is a conceptual diagram illustrating an example cross-component sample adaptive offset (CCSAO) process in the presence of a virtual boundary according to the techniques of this disclosure. In CCSAO, each sample may be classified according to a "band classifier" or an "edge-based classifier".
[0180] Different from SAO's "Band Classifier (BO)", CCSAO's "Band Classifier (BO)" uses spatial neighbors to calculate the band information of a given sample.
[0181] CCSAO virtual boundary processing for a "vertical" boundary, such as vertical virtual boundary 170, may include the following. For a vertical virtual boundary 170 whose position is given by an "X" coordinate value (e.g., X_VerPosVB), the filtering of a given sample "A" with coordinates (x-pos, y-pos) is as follows:
[0182] All neighboring samples of a given sample "A" for which the given condition (x-pos == X_VerPosVB)||(x-pos == X_VerPosVB-1)) is evaluated to be true are referred to as "unavailable". Thus, if a given sample x-pos is identical to the "X" coordinate of a vertical virtual boundary, filtering is disabled for the given sample, and if an unavailable neighboring sample is selected to derive "band" information, filtering is also disabled.
[0183] For example, in Fig. 9 , for sample 4, filtering is disabled because the x-pos of sample 4 is the same as the “X” coordinate of the vertical virtual boundary 170 .
[0184] CCSAO virtual boundary processing for "horizontal" boundaries, such as horizontal virtual boundary 172, may be performed as follows. For a horizontal virtual boundary 172 whose position is given by a "Y" coordinate value (e.g., Y_VerPosVB), filtering for a given sample "A" with coordinates (x-pos, y-pos) is as follows:
[0185] All neighboring samples of a given sample "A" for which the given condition (y-pos == Y_VerPosVB)||(y-pos == Y_VerPosVB-1)) is evaluated to be true are referred to as "unavailable". Thus, if the given sample y-pos is the same as the "Y" coordinate of the horizontal virtual boundary 172, filtering is disabled for the given sample, and if an unavailable neighboring sample is selected to derive "band" information, filtering is also disabled.
[0186] For example, in Fig. 9 , for sample 4, filtering is disabled because the y-pos of sample 4 is the same as the “Y” coordinate of the horizontal virtual boundary 172 .
[0187] In general, when a given sample falls on a virtual boundary (horizontal virtual boundary 172 or vertical virtual boundary 170), CCSAO filtering is not applied to the given sample. In addition, if a given spatial neighbor is adjacent to the virtual boundary, the spatial neighbor is determined to be unavailable. For the horizontal virtual boundary 172, all samples above the horizontal virtual boundary 172 are referred to as unavailable (e.g., samples 0, 1, and 2). Similarly, for the vertical virtual boundary 170, all samples to the left of the vertical virtual boundary 170 are referred to as unavailable (e.g., samples 0, 3, and 6).
[0188] In summary, for a given sample, if the sample falls on a virtual boundary, CCSAO is not applied. For the case where the sample does not fall on a virtual boundary, the video encoder 200 and the video decoder 300 may check the availability of all eight neighboring samples (0 to 8) individually, and only the available samples (on the same side of one or more virtual boundaries as the current sample) are used to calculate the band information. The video encoder 200 may select a spatial neighbor among the available spatial neighbors based on rate-distortion optimization (RDO) for calculating the "band" information, and may signal the selected neighbor in the bitstream.
[0189] In addition, in the "Edge-based Classifier", check the four 1D directions (such as FIG. 8A to FIG. 8D A given 1D direction in which all samples are available is used to compute the “band” information.
[0190] In another alternative, samples that are unavailable due to virtual boundary processing are replaced with padding samples generated from available neighboring samples (eg, by copying the nearest available neighboring samples). The replaced samples are used for CCSAO processing, so that CCSAO processing can remain unchanged.
[0191] Fig.10 174 is a conceptual diagram illustrating an example bilateral filtering (BIF) process in the presence of virtual boundaries according to the techniques of this disclosure. Whenever a given sample falls outside one of the virtual boundaries (i.e., vertical virtual boundary 174 or horizontal virtual boundary 176), repetitive padding is applied. For example, in Fig.10 For I C Filtering, Sample I NW ,I A ,I NE ,I AA ,I NW ,I L ,I SW ,I LL are considered unusable because they fall along or outside at least one virtual boundary. Therefore, by replicating the sample I in the corresponding direction c ,I R ,I RR ,I B ,I BB to apply a Repeat fill.
[0192] For the vertical virtual border 174, the “repeat” fill works by duplicating the sample I AA ,I A ,I c ,I B ,I BB As a sample I NW ,,IL ,I SW ,I LL Alternative.
[0193] For the horizontal virtual border 176, the "repeat" fill works by duplicating the sample I L ,I c ,I R I BB As a sample I NW ,I A ,I NE, I AA Alternative.
[0194] In another alternative, samples that are unusable due to virtual boundary processing are excluded from BIF processing.
[0195] The virtual boundary processing for ALF in VVC includes applying repeated padding to unavailable samples. The minimum padding size required for ALF filtering is 3 samples because the maximum filter size is a 7×7 diamond. However, according to the technology of the present disclosure, the maximum filter size is increased to a 13×13 diamond, so the minimum padding size can be increased to 6 samples. For CCALF, the minimum padding size can be increased to 4 samples.
[0196] Fig.11 is a block diagram illustrating an example video encoder 200 that may perform the techniques of this disclosure. Fig.11 It is provided for the purpose of explanation and should not be considered as limiting the techniques extensively illustrated and described in this disclosure. For the purpose of explanation, this disclosure describes a video encoder 200 according to 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 and video coding formats, such as AV1 and subsequent formats of the AV1 video coding format.
[0197] exist Fig.11In the example of , the video encoder 200 includes a video data memory 230, a mode selection unit 202, a residual generation unit 204, a transform processing unit 206, a quantization unit 208, an inverse quantization unit 210, an inverse transform processing unit 212, a reconstruction unit 214, a filter unit 216, a decoded picture buffer (DPB) 218, and an entropy coding unit 220. Any or all of the video data memory 230, 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 can be implemented in one or more processors or in a processing circuit. For example, the units of the video encoder 200 can 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. In addition, the video encoder 200 may include additional or alternative processors or processing circuits to perform these and other functions.
[0198] Video data memory 230 may store video data to be encoded by components of video encoder 200. Video encoder 200 may receive video data from, for example, video source 104 ( Figure 1 ) receives video data stored in video data memory 230. DPB218 can act as a reference picture memory, which stores reference video data for use when subsequent video data is predicted by video encoder 200. Video data memory 230 and DPB 218 can be formed by any memory device in a variety of memory devices, such as dynamic random access memory (DRAM) (including synchronous DRAM (SDRAM)), magnetoresistive RAM (MRAM), resistive RAM (RRAM) or other types of memory devices. Video data memory 230 and DPB 218 can be provided by the same memory device or a separate memory device. In various examples, video data memory 230 can be on-chip with other components of video encoder 200 (as shown), or off-chip relative to those components.
[0199] In the present disclosure, references to the video data memory 230 should not be interpreted as limited to a memory inside the video encoder 200 (unless otherwise specified) or a memory outside the video encoder 200 (unless otherwise specified). Rather, references to the video data memory 230 should be understood as a reference memory that stores video data received by the video encoder 200 for encoding (e.g., video data for a current block to be encoded). Figure 1 The memory 106 may also provide temporary storage for outputs from the various units of the video encoder 200 .
[0200] Illustrated Fig.11 The various units of the video encoder 200 are described to help understand the operations performed by the video encoder 200. The units may be implemented as fixed-function circuits, programmable circuits, or a combination thereof. Fixed-function circuits refer to circuits that provide specific functionality and pre-set the operations that can be performed. Programmable circuits refer to circuits that can be programmed to perform various tasks and provide flexible functionality in the operations that can be performed. For example, a programmable circuit can execute software or firmware that causes the programmable circuit to operate in a manner defined by the instructions of the software or firmware. Fixed-function circuits can execute software instructions (e.g., to receive parameters or output parameters), but the types of operations performed by fixed-function circuits are generally immutable. In some examples, one or more of the units may be different circuit blocks (fixed-function or programmable), and in some examples, one or more of the units may be integrated circuits.
[0201] The video encoder 200 may include an arithmetic logic unit (ALU), an elementary function unit (EFU), a digital circuit, an analog circuit, and / or a programmable core formed by a programmable circuit. In an example in which the operation of the video encoder 200 is performed using software executed by a programmable circuit, the memory 106 ( Figure 1 ) may store instructions (eg, object code) for software received and executed by the video encoder 200, or another memory (not shown) within the video encoder 200 may store such instructions.
[0202] The video data memory 230 is configured to store the 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 original video data to be encoded.
[0203] The mode selection unit 202 includes a motion estimation unit 222, a motion compensation unit 224, and an intra prediction unit 226. The mode selection unit 202 may include additional functional units to perform video prediction according to other prediction modes. As an example, the mode selection unit 202 may include a palette unit, an intra-block copy unit (which may be part of the motion estimation unit 222 and / or the motion compensation unit 224), an affine unit, a linear model (LM) unit, etc.
[0204] The mode selection unit 202 typically coordinates multiple encoding passes to test combinations of encoding parameters and resulting rate-distortion values for such combinations. The encoding parameters may include the partitioning of CTUs into CUs, the prediction mode for a CU, the transform type for the residual data of a CU, the quantization parameter for the residual data of a CU, etc. The mode selection unit 202 may ultimately select a coding parameter combination that has a better rate-distortion value than other tested combinations.
[0205] The video encoder 200 may divide the picture retrieved from the video data memory 230 into a series of CTUs, and encapsulate one or more CTUs in a slice. The mode selection unit 202 may divide the CTUs of the picture according to a tree structure (such as an MTT structure, a QTBT structure, a super block structure, or the above-mentioned quadtree structure). As described above, the video encoder 200 may form one or more CUs by dividing the CTUs according to the tree structure. Such CUs may also be generally referred to as "video blocks" or "blocks".
[0206] Typically, 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 the current block (e.g., the current CU, or in HEVC, the overlapping portion of the PU and TU). In order to inter-predict the current block, the motion estimation unit 222 may perform a motion search to identify one or more closely matching reference blocks in one or more reference pictures (e.g., one or more previously decoded pictures stored in the DPB 218). Specifically, the motion estimation unit 222 may calculate values representing how similar the potential reference blocks will be to the current block, for example, based on the sum of absolute differences (SAD), the sum of squared differences (SSD), the mean absolute difference (MAD), the mean squared difference (MSD), etc. The motion estimation unit 222 may typically perform these calculations using the sample-by-sample differences between the current block and the reference block under consideration. The motion estimation unit 222 may identify the reference block having the lowest value resulting from these calculations to indicate the reference block that best matches the current block.
[0207] The motion estimation unit 222 may form one or more motion vectors (MVs) that define the position of the reference block in the reference picture relative to the position of the current block in the current picture. The motion estimation unit 222 may then provide the motion vectors to the motion compensation unit 224. For example, for unidirectional inter prediction, the motion estimation unit 222 may provide a single motion vector, while for bidirectional inter prediction, the motion estimation unit 222 may provide two motion vectors. The motion compensation unit 224 may then use the motion vectors to generate a prediction block. For example, the motion compensation unit 224 may use the motion vectors to retrieve data for the reference block. As another example, if the motion vector has fractional sample precision, the motion compensation unit 224 may interpolate the values of the prediction block according to one or more interpolation filters. In addition, for bidirectional inter prediction, the motion compensation unit 224 may retrieve data for two reference blocks identified by the corresponding motion vectors and combine the retrieved data, for example, by sample-by-sample averaging or weighted averaging.
[0208] When operating according to the AV1 video coding format, the motion estimation unit 222 and the motion compensation unit 224 may be configured to encode coding blocks of the video data (e.g., both luma coding blocks and chroma coding blocks) using translational motion compensation, affine motion compensation, overlapped block motion compensation (OBMC), and / or composite inter-intra prediction.
[0209] As another example, for intra prediction or intra prediction coding, the intra prediction unit 226 may generate a prediction block from samples adjacent to the current block. For example, for directional mode, the intra prediction unit 226 may generally mathematically combine the values of the adjacent samples and pad these calculated values across the current block in a defined direction to produce a prediction block. As another example, for DC mode, the intra prediction unit 226 may calculate an average of the adjacent samples of the current block and generate a prediction block to include the resulting average for each sample of the prediction block.
[0210] When operating according to the AV1 video coding format, the intra prediction unit 226 may be configured to encode coding blocks of video data (e.g., both luma coding blocks and chroma coding blocks) using directional intra prediction, non-directional intra prediction, recursive filter intra prediction, chroma from luma (CFL) prediction, intra block copy (IBC), and / or palette mode. The mode selection unit 202 may include additional functional units to perform video prediction according to other prediction modes.
[0211] The mode selection unit 202 provides the prediction block to the residual generation unit 204. The residual generation unit 204 receives the original uncoded version of the current block from the video data memory 230 and receives the prediction block from the mode selection unit 202. The residual generation unit 204 calculates the sample-by-sample difference between the current block and the prediction block. The resulting sample-by-sample difference defines a residual block for the current block. In some examples, the residual generation unit 204 may also determine the difference between the sample values in the residual block to generate the residual block using residual differential pulse coding modulation (RDPCM). In some examples, the residual generation unit 204 may be formed using one or more subtractor circuits that perform binary subtraction.
[0212] In an example where the mode selection unit 202 divides the CU 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 of various sizes. As noted above, the size of a CU may refer to the size of a luma coding block of the CU, and the size of a PU may refer to the size of a luma prediction unit of the PU. Assuming that the size of a particular CU is 2Nx2N, the video encoder 200 may support PU sizes of 2Nx2N or NxN for intra-prediction, and 2Nx2N, 2NxN, Nx2N, NxN or similar symmetric PU sizes for inter-prediction. The video encoder 200 and the video decoder 300 may also support asymmetric partitioning for PU sizes of 2NxnU, 2NxnD, nLx2N, and nRx2N for inter-prediction.
[0213] In an example where mode selection unit 202 does not further divide a CU into PUs, each CU may be associated with a luma coding block and a corresponding chroma coding block. As above, the size of a CU may refer to the size of the luma coding block of the CU. Video encoder 200 and video decoder 300 may support CU sizes of 2Nx2N, 2NxN, or Nx2N.
[0214] For other video coding techniques, such as intra-block copy mode coding, affine mode coding, and linear model (LM) mode coding, as some examples, the mode selection unit 202 generates a prediction block for the current block being encoded via a corresponding unit associated with the coding technique. In some examples (such as palette mode coding), the mode selection unit 202 may not generate a prediction block, but instead generate syntax elements indicating the manner in which the block is reconstructed based on the selected palette. In such a mode, the mode selection unit 202 may provide these syntax elements to the entropy coding unit 220 for encoding.
[0215] As described above, the residual generation unit 204 receives video data for a current block and a corresponding prediction block. The residual generation unit 204 then generates a residual block for the current block. To generate the residual block, the residual generation unit 204 calculates the sample-by-sample difference between the prediction block and the current block.
[0216] The 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"). The transform processing unit 206 may apply various transforms to the residual block to form a transform coefficient block. For example, the 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, the transform processing unit 206 may perform a variety of transforms on the residual block, for example, a primary transform and a secondary transform (such as a rotation transform). In some examples, the transform processing unit 206 does not apply a transform to the residual block.
[0217] When operating according to AV1, the transform processing unit 206 may apply one or more transforms to the residual block to generate a block of transform coefficients (referred to herein as a "transform coefficient block"). The transform processing unit 206 may apply various transforms to the residual block to form a transform coefficient block. For example, the transform processing unit 206 may apply a horizontal / vertical transform combination, which may include a discrete cosine transform (DCT), an asymmetric discrete sine transform (ADST), a flipped ADST (e.g., ADST in reverse order), and an identity transform (IDTX). When the identity transform is used, the transform is skipped in one of the vertical direction or the horizontal direction. In some examples, the transform process may be skipped.
[0218] The quantization unit 208 may quantize the transform coefficients in the transform coefficient block to produce 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 cause a loss of information, and therefore, the quantized transform coefficients may have a lower precision than the original transform coefficients produced by the transform processing unit 206.
[0219] The inverse quantization unit 210 and the inverse transform processing unit 212 may apply inverse quantization and inverse transform, respectively, to the quantized transform coefficient block to reconstruct a residual block from the transform coefficient block. The reconstruction unit 214 may generate a reconstructed block corresponding to the current block (although potentially with some degree of distortion) based on the reconstructed residual block and the prediction block generated by the mode selection unit 202. For example, the reconstruction unit 214 may add samples of the reconstructed residual block to corresponding samples from the prediction block generated by the mode selection unit 202 to generate a reconstructed block.
[0220] The filter unit 216 may perform one or more filtering operations on the reconstructed block. For example, the filter unit 216 may perform a deblocking operation to reduce blocking artifacts along the edge of the CU. In some examples, the operation of the filter unit 216 may be skipped. The filter unit 216 may apply any of the various techniques of the present disclosure alone or in any combination. For example, the filter unit 216 may be configured to perform any or all of the CCSAO with virtual boundary technology, the BIF with virtual boundary technology, and / or the ALF with virtual boundary technology of the present disclosure.
[0221] Filter unit 216 may be configured to filter the decoded / reconstructed blocks received from reconstruction unit 214. Filter unit 216 may perform CCSAO according to the techniques of this disclosure, for example, as described above with respect to Fig. 9 and Fig.10 Specifically, filter unit 216 may determine that a current sample of a decoded block is adjacent to a sample along a virtual boundary in the decoded block. Filter unit 216 may also determine that the current sample is adjacent to one or more samples that are not along any virtual boundary in the decoded block. In response, filter unit 216 may use at least one of the one or more samples that are not along any virtual boundary in the decoded block and not use samples along the virtual boundary to calculate the band information of CCSAO to be used for the current sample.
[0222] As above relative to Fig. 9 As explained, for example, filter unit 216 may perform CCSAO on sample 2 without using any of samples 1, 4, and 5, but may instead use samples above, above and to the right, and / or to the right of sample 2. As another example, filter unit 216 may perform CCSAO on sample 8 using samples to the right, below, and to the right, and / or below sample 8. In some examples, filter unit 216 may replace unavailable neighboring sample values with filler values when performing CCSAO. For example, when performing CCSAO on sample 2, the value of sample 2 may be used as a filler value to replace the values of samples 1 and 5.
[0223] When operating according to AV1, filter unit 216 may perform one or more filtering operations on the reconstructed block. For example, filter unit 216 may perform a deblocking operation to reduce blocking artifacts along the edges of the CU. In other examples, filter unit 216 may apply a constrained directional enhancement filter (CDEF), which may be applied after deblocking and may include the application of a non-separable, non-linear, low-pass directional filter based on the estimated edge direction. Filter unit 216 may also include a loop recovery filter applied after CDEF, and may include a separable symmetric normalized Wiener filter or a dual self-guided filter.
[0224] The video encoder 200 stores the reconstructed blocks in the DPB 218. For example, in an example where the operation of the filter unit 216 is not performed, the reconstruction unit 214 may store the reconstructed blocks in the DPB 218. In an example where the operation of the filter unit 216 is 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 a reference picture formed by the reconstructed (and potentially filtered) blocks from the DPB 218 to perform inter-frame prediction on blocks of subsequently encoded pictures. In addition, the intra-frame prediction unit 226 may use the reconstructed blocks of the current picture in the DPB 218 to perform intra-frame prediction on other blocks in the current picture.
[0225] In general, the entropy coding unit 220 may entropy encode syntax elements received from other functional components of the video encoder 200. For example, the entropy coding unit 220 may entropy encode a quantized transform coefficient block from the quantization unit 208. As another example, the entropy coding unit 220 may entropy encode a prediction syntax element (e.g., motion information for inter-frame prediction or intra-frame mode information for intra-frame prediction) from the mode selection unit 202. The entropy coding unit 220 may perform one or more entropy coding operations on the syntax element (the syntax element is another example of video data) to generate entropy encoded data. For example, the entropy coding 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 partitioning entropy (PIPE) coding operation, an exponential Golomb coding operation, or another type of entropy coding operation on the data. In some examples, the entropy coding unit 220 may operate in a bypass mode where the syntax element is not entropy encoded.
[0226] The video encoder 200 may output a bitstream including entropy-encoded syntax elements required to reconstruct a block of a slice or picture. Specifically, the entropy encoding unit 220 may output a bitstream.
[0227] According to AV1, the entropy coding unit 220 may be configured as a symbol-to-symbol adaptive multi-symbol arithmetic decoder. The syntax elements in AV1 include an alphabet of N elements, and the context (e.g., a probability model) includes a set of N probabilities. The entropy coding unit 220 may store the probabilities as an n-bit (e.g., 15-bit) cumulative distribution function (CDF). The entropy coding unit 220 may perform recursive scaling using an update factor based on the size of the alphabet to update the context.
[0228] 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 the luma components and chroma components of a CU. In some examples, the luma coding blocks and chroma coding blocks are the luma components and chroma components of a PU.
[0229] In some examples, operations performed with respect to luma coding blocks need not 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 repeat the MVs and reference pictures used to identify chroma blocks. Instead, the MVs for luma coding blocks may be scaled to determine the 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.
[0230] Thus, the video encoder 200 represents an example of a device for decoding video data, including a memory configured to store video data (e.g., video data memory 230, DPB 218); and one or more processors (e.g., mode selection unit 202, motion compensation unit 224, intra prediction unit 226, inverse transform processing unit 212, inverse quantization unit 210, reconstruction unit 214, and filter unit 216), the one or more processors being implemented in a circuit and configured to: decode a current block of the video data to form a decoded block; determine that a current sample of the decoded block is adjacent to a sample along a virtual boundary in the decoded block and is adjacent to one or more samples that are not along any virtual boundary in the decoded block; calculate band information for cross-component sample adaptive offset (CCSAO) for the current sample using at least one of the one or more samples that are not along any virtual boundary in the decoded block and not using samples along the virtual boundary; and perform CCSAO on the current sample using the band information.
[0231] Likewise, the video encoder 200 represents an example of an apparatus for decoding video data, including components for decoding a current block of video data to form a decoded block (e.g., a mode selection unit 202, a motion compensation unit 224, an intra-prediction unit 226, an inverse transform processing unit 212, an inverse quantization unit 210, and a reconstruction unit 214); components for determining that a sample of the decoded block is adjacent to a sample along a virtual boundary in the decoded block and is adjacent to one or more samples that are not along any virtual boundary in the decoded block (e.g., a filter unit 216); components for calculating band information for cross-component sample adaptive offset (CCSAO) for the sample using at least one of the one or more samples that are not along any virtual boundary in the decoded block and not using samples along the virtual boundary (e.g., the filter unit 216); and components for performing CCSAO on the sample using the band information (e.g., the filter unit 216).
[0232] Fig.12 is a block diagram illustrating an example video decoder 300 that may perform the techniques of this disclosure. Fig.12 It is provided for the purpose of explanation and is not a limitation of the techniques extensively illustrated and described in this disclosure. For the purpose of explanation, this disclosure describes the video decoder 300 according to the techniques of VVC (ITU-TH.266, under development) and HEVC (ITU-TH.265). However, the techniques of this disclosure may be performed by video decoding devices configured for other video decoding standards.
[0233] exist Fig.12 In the example of , 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 decoded picture buffer (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 can be implemented in one or more processors or in processing circuits. For example, the units of the video decoder 300 can 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. In addition, the video decoder 300 may include additional or alternative processors or processing circuits to perform these and other functions.
[0234] 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 to perform predictions according to other prediction modes. As an 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.
[0235] When operating according to AV1, the motion compensation unit 316 may be configured to decode coding blocks of video data (e.g., both luma coding blocks and chroma coding blocks) using translational motion compensation, affine motion compensation, OBMC, and / or composite inter-intra prediction, as described above. As described above, the intra prediction unit 318 may be configured to decode coding blocks of video data (e.g., both luma coding blocks and chroma coding blocks) using directional intra prediction, non-directional intra prediction, recursive filter intra prediction, CFL, intra-block copy (IBC), and / or palette mode.
[0236] CPB memory 320 may store video data, such as an encoded video bitstream, to be decoded by components of video decoder 300. For example, the video bitstream may be obtained from computer readable medium 110 ( Figure 1 ) obtains video data stored in CPB memory 320. CPB memory 320 may include a CPB that stores coded video data (e.g., syntax elements) from a coded video bitstream. In addition, CPB memory 320 may store video data other than syntax elements of decoded pictures, such as temporary data representing outputs from various units of video decoder 300. DPB 314 typically stores decoded pictures, which video decoder 300 may output, and / or use the decoded pictures as reference video data when decoding subsequent data or pictures of the coded video bitstream. CPB memory 320 and DPB 314 may be formed by any storage device in a variety of memory devices, such as dynamic random access memory (DRAM) (including synchronous DRAM (SDRAM)), magnetoresistive RAM (MRAM), resistive RAM (RRAM), or other types of memory devices. CPB memory 320 and DPB 314 may be provided by the same memory device or a separate memory device. In various examples, CPB memory 320 may be on-chip with other components of video decoder 300, or off-chip relative to those components.
[0237] Additionally or alternatively, in some examples, video decoder 300 may retrieve the video from memory 120 ( Figure 1) to retrieve the decoded video data. That is, memory 120 may utilize CPB memory 320 to store data as discussed above. Likewise, 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, memory 120 may store instructions to be executed by video decoder 300.
[0238] Illustrated Fig.12 The various units shown in FIG. 3 are used to help understand the operations performed by the video decoder 300. The units may be implemented as fixed function circuits, programmable circuits, or a combination thereof. Fig.11 , fixed-function circuits refer to circuits that provide specific functionality and are pre-set for the operations that can be performed. Programmable circuits refer to circuits that can be programmed to perform various tasks and provide flexible functionality in the operations that can be performed. For example, a programmable circuit can execute software or firmware that causes the programmable circuit to operate in a manner defined by the instructions of the software or firmware. Fixed-function circuits can execute software instructions (e.g., to receive parameters or output parameters), but the type of operation performed by the fixed-function circuit is generally immutable. In some examples, one or more of the units may be different circuit blocks (fixed-function or programmable), and in some examples, one or more of the units may be integrated circuits.
[0239] The video decoder 300 may include an ALU, an EFU, a digital circuit, an analog circuit, and / or a programmable core formed by a programmable circuit. In an example where the operation of the video decoder 300 is performed by software executed on the programmable circuit, an on-chip or off-chip memory may store instructions (e.g., object code) of the software received and executed by the video decoder 300.
[0240] The entropy decoding unit 302 may receive the encoded video data from the CPB and entropy decode the video data to reproduce the syntax elements. The prediction processing unit 304, the inverse quantization unit 306, the inverse transform processing unit 308, the reconstruction unit 310, and the filter unit 312 may generate decoded video data based on the syntax elements extracted from the bitstream.
[0241] The filter unit 312 may apply any of the various techniques of the present disclosure alone or in any combination. For example, the filter unit 312 may be configured to perform any or all of the CCSAO with virtual boundary technique, the BIF with virtual boundary technique, and / or the ALF with virtual boundary technique of the present disclosure.
[0242] Filter unit 312 may be configured to filter the decoded / reconstructed blocks received from reconstruction unit 310. Filter unit 312 may perform CCSAO according to the techniques of this disclosure, for example, as described above with respect to Fig. 9 and Fig.10 Specifically, filter unit 312 may determine that a current sample of a decoded block is adjacent to a sample along a virtual boundary in the decoded block. Filter unit 312 may also determine that the current sample is adjacent to one or more samples that are not along any virtual boundary in the decoded block. In response, filter unit 312 may use at least one of the one or more samples that are not along any virtual boundary in the decoded block and not use samples along the virtual boundary to calculate the band information of CCSAO to be used for the current sample.
[0243] As above relative to Fig. 9 As explained, for example, filter unit 312 may perform CCSAO on sample 2 without using any of samples 1, 4, and 5, but may instead use samples above, above and to the right, and / or to the right of sample 2. As another example, filter unit 312 may perform CCSAO on sample 8 using samples to the right, below and to the right, and / or below sample 8. In some examples, filter unit 312 may replace unavailable neighboring sample values with filler values when performing CCSAO. For example, when performing CCSAO on sample 2, the value of sample 2 may be used as a filler value to replace the values of samples 1 and 5.
[0244] Generally, the video decoder 300 reconstructs a picture block by block. The video decoder 300 may perform a reconstruction operation on each block individually (wherein a block currently being reconstructed (ie, decoded) may be referred to as a "current block").
[0245] The entropy decoding unit 302 may entropy decode syntax elements defining the quantized transform coefficients of the quantized transform coefficient block and transform information, such as a quantization parameter (QP) and / or a transform mode indication. The inverse quantization unit 306 may use the QP associated with the quantized transform coefficient block to determine a degree of quantization and, likewise, a degree of inverse quantization to be applied by the inverse quantization unit 306. The inverse quantization unit 306 may, for example, perform 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.
[0246] After the inverse quantization unit 306 forms the transform coefficient block, the inverse transform processing unit 308 may apply one or more inverse transforms to the transform coefficient block to generate a residual block associated with the current block. For example, the inverse transform processing unit 308 may apply an inverse DCT, an inverse integer transform, an inverse Karhunen-Loeve transform (KLT), an inverse rotational transform, an inverse directional transform, or another inverse transform to the transform coefficient block.
[0247] In addition, prediction processing unit 304 generates a prediction block based on the prediction information syntax elements entropy decoded by entropy decoding unit 302. For example, if the prediction information syntax elements indicate that the current block is inter-predicted, motion compensation unit 316 can generate the prediction block. In this case, the prediction information syntax elements can indicate a reference picture in DPB 314 from which to retrieve the reference block, and a motion vector that identifies the position of the reference block in the reference picture relative to the position of the current block in the current picture. Motion compensation unit 316 can generally generate ... Fig.11 )The inter-frame prediction process is performed in a manner substantially similar to that described in the accompanying drawings.
[0248] As another example, if the prediction information syntax element indicates that the current block is intra-predicted, the intra-prediction unit 318 may generate a prediction block according to the intra-prediction mode indicated by the prediction information syntax element. Similarly, the intra-prediction unit 318 may generally generate a prediction block according to the same method as that used with respect to the intra-prediction unit 226 ( Fig.11 The intra prediction process is performed in a manner substantially similar to that described in the foregoing description. The intra prediction unit 318 may retrieve data of neighboring samples of the current block from the DPB 314.
[0249] The reconstruction unit 310 may reconstruct the current block using the prediction block and the residual block. For example, the reconstruction unit 310 may add samples of the residual block to corresponding samples of the prediction block to reconstruct the current block.
[0250] The filter unit 312 may perform one or more filtering operations on the reconstructed block. For example, the filter unit 312 may perform a deblocking operation to reduce blocking artifacts along the edges of the reconstructed block. The operations of the filter unit 312 may not necessarily be performed in all examples.
[0251] The video decoder 300 may store the reconstructed block in the DPB 314. For example, in examples where the operation of the filter unit 312 is not performed, the reconstruction unit 310 may store the reconstructed block in the DPB 314. In examples where the operation of the filter unit 312 is performed, the filter unit 312 may store the filtered reconstructed block in the DPB 314. As discussed above, the DPB 314 may provide reference information (such as samples of the current picture for intra-frame prediction and previously decoded pictures for subsequent motion compensation) to the prediction processing unit 304. In addition, the video decoder 300 may output a decoded picture (e.g., a decoded video) from the DPB 314 for use in, for example, Figure 1 Subsequent presentation on a display device such as display device 118.
[0252] Thus, the video decoder 300 represents an example of a device for decoding video data, including a memory (e.g., CPB 320, DPB 314) configured to store video data; and one or more processors (e.g., prediction processing unit 304, motion compensation unit 316, intra prediction unit 318, inverse transform processing unit 308, inverse quantization unit 306, reconstruction unit 310, and filter unit 312), the one or more processors being implemented in circuits and configured to: decode a current block of the video data to form a decoded block; determine that a current sample of the decoded block is adjacent to a sample along a virtual boundary in the decoded block and is adjacent to one or more samples that are not along any virtual boundary in the decoded block; calculate band information for cross-component sample adaptive offset (CCSAO) for the current sample using at least one of the one or more samples that are not along any virtual boundary in the decoded block and not using samples along the virtual boundary; and perform CCSAO on the current sample using the band information.
[0253] Likewise, the video decoder 300 represents an example of an apparatus for decoding video data, including components for decoding a current block of video data to form a decoded block (e.g., a prediction processing unit 304, a motion compensation unit 316, an intra-prediction unit 318, an inverse transform processing unit 308, an inverse quantization unit 306, and a reconstruction unit 310); components for determining that a sample of the decoded block is adjacent to a sample along a virtual boundary in the decoded block and is adjacent to one or more samples that are not along any virtual boundary in the decoded block (e.g., a filter unit 312); components for calculating band information for cross-component sample adaptive offset (CCSAO) for the sample using at least one of the one or more samples that are not along any virtual boundary in the decoded block and not using samples along the virtual boundary (e.g., the filter unit 312); and components for performing CCSAO on the sample using the band information (e.g., the filter unit 312).
[0254] Fig.13 2 is a flowchart illustrating an example method for encoding a current block according to the technology of the present disclosure. The current block may include a current CU. Although relative to the video encoder 200 ( Figure 1 and Fig.11 ), but it should be understood that other devices may be configured to perform the same Fig.13 A similar approach to the one used in this paper.
[0255] In this example, the video encoder 200 initially predicts a current block (350). For example, the video encoder 200 may form a prediction block for the current block. The video encoder 200 may then calculate a residual block for the current block (352). To calculate the residual block, the video encoder 200 may calculate the difference between the original uncoded block and the prediction block of the current block. The video encoder 200 may then transform the residual block and quantize the transform coefficients of the residual block (354). Next, the video encoder 200 may scan the quantized transform coefficients of the residual block (356). During or after the scan, the video encoder 200 may entropy encode the transform coefficients (358). For example, the video encoder 200 may use CAVLC or CABAC to encode the transform coefficients. The video encoder 200 may then output entropy encoded data for the block (360).
[0256] The video encoder 200 may also decode the current block after encoding the current block to use the decoded version of the current block as reference data for subsequent decoding data (e.g., in an inter-frame prediction mode or an intra-frame prediction mode). Therefore, the video encoder 200 may inverse quantize and inverse transform the coefficients to reproduce the residual block (362). The video encoder 200 may combine the residual block with the prediction block to form a decoded block (364). The video encoder 200 may also perform any of the various techniques of the present disclosure related to SAO and / or filtering on the decoded block (366). The video encoder 200 may then store the decoded block in the DPB 218 (368).
[0257] Fig.14 1 is a flowchart illustrating an example method for decoding a current block of video data according to the techniques of the present disclosure. The current block may include a current CU. Although relative to the video decoder 300 ( Figure 1 and Fig.12 ), but it should be understood that other devices may be configured to perform the same Fig.14 A similar approach to the one used in this paper.
[0258] The video decoder 300 may receive entropy coded data for a current block, such as entropy coded prediction information and entropy coded data for transform coefficients of a residual block corresponding to the current block (370). The video decoder 300 may entropy decode the entropy coded data to determine prediction information for the current block and reproduce transform coefficients of the residual block (372). The video decoder 300 may predict the current block (374), for example, using an intra prediction mode or an inter prediction mode as indicated by the prediction information of the current block, to calculate a prediction block for the current block. The video decoder 300 may then inverse scan the reproduced transform coefficients (376) to create a block of quantized transform coefficients. The video decoder 300 may then inverse quantize the transform coefficients and apply an inverse transform to the transform coefficients to generate a residual block (378). The video decoder 300 may also perform any of the various techniques of the present disclosure related to SAO and / or filtering on the current block (380). The video decoder 300 may finally decode the current block by combining the prediction block and the residual block (382).
[0259] Fig.15 is a flow chart illustrating an example method of decoding a block of video data and filtering the decoded block of video data in accordance with the techniques of this disclosure. Fig.15 The method may be performed by a video encoding and / or decoding device (such as the video encoder 200 or the video decoder 300). For example, the video decoder 300 is explained Fig.15 method.
[0260] Initially, the video decoder 300 decodes a current block of video data (400). For example, the video decoder 300 may form a prediction block for the current block, for example using inter-frame prediction and / or intra-frame prediction. The video decoder 300 may also decode and reconstruct a residual block for the current block. The video decoder 300 may then decode (reconstruct) the current block, for example, combining samples of the prediction block with co-located samples of the residual block. In some examples, the video decoder 300 may also perform deblock filtering on the decoded block.
[0261] The video decoder 300 may then determine that a current sample of the decoded current block is adjacent to a sample along a virtual boundary (402). The virtual boundary may be signaled using, for example, a sequence parameter set (SPS), a picture parameter set (PPS), an adaptation parameter set (APS), a picture header, a slice header, a block header, etc. In some cases, the virtual boundary may be derived. In some examples, the virtual boundary may correspond to a slice boundary and / or a tile boundary of a picture. For example, in VVC, the SPS includes syntax elements that indicate whether virtual boundaries are enabled, and if enabled, the number of virtual boundaries, and for each of the virtual boundaries, the x position of the vertical virtual boundary and the y position of the horizontal virtual boundary of the picture sequence. The VVS also includes picture header syntax elements that indicate whether virtual boundaries are enabled, and if enabled, the number of virtual boundaries, and for each of the virtual boundaries, the x position of the vertical virtual boundary and the y position of the horizontal virtual boundary of the particular picture.
[0262] Thus, the video encoder 200 may encode an SPS and / or a picture header that indicates such information representing the location of a virtual boundary in a picture or sequence of pictures. Likewise, the video decoder 300 may decode the SPS and / or the picture header to determine the location of the virtual boundary and whether the sample is along the virtual boundary. For example, the video decoder 300 may determine that the sample is along the virtual boundary when the sample has an x position equal to one of the x positions signaled in the SPS or picture header for a vertical virtual boundary or a y position equal to one of the y positions signaled in the SPS or picture header for a horizontal virtual boundary.
[0263] The video decoder 300 may also determine that a current sample of the decoded current block is adjacent to one or more samples that are not along any virtual boundaries 404. For example, the video decoder 300 may determine that the sample has an x position that is not equal to any of the x positions of vertical virtual boundaries signaled in the SPS or the picture header and a y position that is not equal to any of the y positions of horizontal virtual boundaries signaled in the SPS or the picture header.
[0264] Video decoder 300 may then calculate band information for the current sample using one or more samples that are not along any virtual boundaries (406). In some examples, video decoder 300 may use padding values to replace values for samples along virtual boundaries when calculating the band information. Video decoder 300 may then perform CCSAO on the current sample using the band information (408).
[0265] so, Fig.15The method represents an example of a method for decoding video data, the method comprising: decoding a current block of video data to form a decoded block; determining that a current sample of the decoded block is adjacent to a sample along a virtual boundary in the decoded block and is adjacent to one or more samples that are not along any virtual boundary in the decoded block; calculating band information for cross-component sample adaptive offset (CCSAO) for the current sample using at least one of the one or more samples that are not along any virtual boundary in the decoded block and not using samples along the virtual boundary; and performing CCSAO on the current sample using the band information.
[0266] Various examples of the techniques of this disclosure are summarized in the following clauses:
[0267] Item 1: A method for decoding video data, the method comprising: decoding a current block of video data to form a decoded block; determining that samples of the decoded block are adjacent to samples along a virtual boundary in the decoded block and are adjacent to one or more samples that are not along any virtual boundary in the decoded block; using at least one of the one or more samples that are not along any virtual boundary in the decoded block and not using the samples along the virtual boundary to calculate band information for cross-component sample adaptive offset (CCSAO) of the sample; and performing CCSAO on the sample using the band information.
[0268] Clause 2: The method of clause 1, further comprising disabling CCSAO for the samples along the virtual boundary.
[0269] Clause 3: The method of clause 1, wherein the one or more samples not along any virtual boundary in the decoded block comprise a pair of opposing adjacent samples, and wherein calculating the frequency band information comprises calculating the frequency band information using the pair of opposing adjacent samples.
[0270] Clause 4: A method according to any one of clauses 1 and 2, wherein the one or more samples that are not along any virtual boundary in the decoding block include a pair of relative adjacent samples, and wherein calculating the frequency band information includes calculating the frequency band information using the pair of relative adjacent samples.
[0271] Item 5: A method according to Item 4, wherein the pair of relative adjacent samples is one of: A) a left adjacent sample and a right adjacent sample of the sample, B) an upper adjacent sample and a lower adjacent sample, C) an upper left adjacent sample and a lower right adjacent sample, or D) an upper right adjacent sample and a lower left adjacent sample.
[0272] Clause 6: A method for decoding video data, the method comprising: decoding a block of video data to form a decoded block; determining that samples of the decoded block are adjacent to samples along a virtual boundary of the virtual block and one or more samples that are not along any virtual boundary in the decoded block; replacing the values of the samples along the virtual boundary with a padding value, the padding value comprising the value of one of the one or more samples that are not along any virtual boundary in the decoded block; and performing bilateral filtering (BIF) on the samples using the padding value.
[0273] Clause 7: A method comprising the method according to any one of clauses 1 to 4 and the method according to clause 5.
[0274] Clause 8: A method according to any one of clauses 5 and 6, further comprising replacing values of samples along or beyond any virtual boundary in the decoding block and within a filtering area of the samples with padding values determined from the one or more samples that are not along any virtual boundary in the decoding block.
[0275] Clause 9: The method of clause 5, further comprising replacing values of samples along or beyond any virtual boundary in the decoded block and within a filtering region of the samples with padding values determined from the one or more samples that are not along the virtual boundary in the decoded block.
[0276] Clause 10: A method of decoding video data, the method comprising: decoding a block of video data to form a decoded block; and performing adaptive loop filtering (ALF) on samples of the decoded block using a minimum padding size of 4 samples.
[0277] Clause 11: A method comprising the method according to any one of clauses 1 to 9 and according to clause 10.
[0278] Clause 12: The method of any one of clauses 1 to 11, further comprising encoding the current block before decoding the current block.
[0279] Clause 13: An apparatus for decoding video data, the apparatus comprising one or more means for performing the method according to any of clauses 1 to 12.
[0280] Clause 14: The apparatus of clause 13, wherein the one or more components comprise one or more processors implemented in circuitry.
[0281] Clause 15: The apparatus of any of clauses 13 and 14, further comprising a display configured to display the decoded video data.
[0282] Clause 16: The device of any of clauses 13 to 15, wherein the device comprises one or more of a camera, a computer, a mobile device, a broadcast receiver device, or a set-top box.
[0283] Clause 17: The apparatus of clauses 13 to 16, further comprising a memory configured to store the video data.
[0284] Clause 18: A computer-readable storage medium having stored thereon instructions which, when executed, cause a processor of an apparatus for decoding video data to perform the method of any one of clauses 1 to 12.
[0285] Item 19: A device for decoding video data, the device comprising: a component for decoding a current block of video data to form a decoded block; a component for determining that a sample of the decoded block is adjacent to a sample along a virtual boundary in the decoded block and is adjacent to one or more samples that are not along any virtual boundary in the decoded block; a component for calculating band information for cross-component sample adaptive offset (CCSAO) of the sample using at least one of the one or more samples that are not along any virtual boundary in the decoded block and not using the samples along the virtual boundary; and a component for performing CCSAO on the sample using the band information.
[0286] Item 20: An apparatus for decoding video data, the apparatus comprising: a component for decoding a block of video data to form a decoded block; a component for determining that samples of the decoded block are adjacent to samples along a virtual boundary of the virtual block and one or more samples that are not along any virtual boundary in the decoded block; a component for replacing the values of the samples along the virtual boundary with a padding value, the padding value comprising the value of one of the one or more samples that are not along any virtual boundary in the decoded block; and a component for performing bilateral filtering (BIF) on the samples using the padding value.
[0287] Clause 21: An apparatus for decoding video data, the apparatus comprising: means for decoding a block of video data to form a decoded block; and means for performing adaptive loop filtering (ALF) on samples of the decoded block using a minimum padding size of 4 samples.
[0288] Item 22: A method for decoding video data, the method comprising: decoding a current block of video data to form a decoded block; determining that a current sample of the decoded block is adjacent to a sample along a virtual boundary in the decoded block and is adjacent to one or more samples that are not along any virtual boundary in the decoded block; using at least one of the one or more samples that are not along any virtual boundary in the decoded block and not using the samples along the virtual boundary to calculate band information for cross-component sample adaptive offset (CCSAO) for the current sample; and performing CCSAO on the current sample using the band information.
[0289] Clause 23: The method of clause 22, further comprising disabling CCSAO for the samples along the virtual boundary.
[0290] Clause 24: The method of clause 22, wherein the one or more samples not along any virtual boundary in the decoded block comprise a pair of opposing adjacent samples, and wherein calculating the frequency band information comprises calculating the frequency band information using the pair of opposing adjacent samples.
[0291] Clause 25: A method according to clause 24, wherein the pair of relative adjacent samples is one of: A) a left adjacent sample and a right adjacent sample of the current sample, B) an upper adjacent sample and a lower adjacent sample, C) an upper left adjacent sample and a lower right adjacent sample, or D) an upper right adjacent sample and a lower left adjacent sample.
[0292] Clause 26: The method according to clause 22 also includes performing bilateral filtering (BIF) on the current sample using a fill value that replaces the value of the sample along the virtual boundary, wherein the fill value includes the value of one of the one or more samples that is not along any virtual boundary in the decoded block.
[0293] Clause 27: The method of clause 26, further comprising replacing values of samples along or beyond any virtual boundary in the decoded block and within a filtering region of the samples with padding values determined from the one or more samples not along the virtual boundary in the decoded block.
[0294] Clause 28: The method of clause 1, further comprising encoding the current block prior to decoding the current block.
[0295] Item 29: A device for decoding video data, the device comprising: a memory configured to store video data; and one or more processors implemented in a circuit and configured to: decode a current block of the video data to form a decoded block; determine that a current sample of the decoded block is adjacent to a sample along a virtual boundary in the decoded block and is adjacent to one or more samples that are not along any virtual boundary in the decoded block; use at least one of the one or more samples that are not along any virtual boundary in the decoded block and do not use the samples along the virtual boundary to calculate band information for cross-component sample adaptive offset (CCSAO) for the current sample; and perform CCSAO on the current sample using the band information.
[0296] Clause 30: The apparatus of clause 29, wherein the one or more processors are further configured to disable CCSAO for the samples along the virtual boundary.
[0297] Clause 31: An apparatus according to clause 29, wherein the one or more samples that are not along any virtual boundary in the decoded block include a pair of relative adjacent samples, and wherein to calculate the frequency band information, the one or more processors are configured to calculate the frequency band information using the pair of relative adjacent samples.
[0298] Clause 32: An apparatus according to clause 31, wherein the pair of relative neighboring samples is one of the following: A) a left neighboring sample and a right neighboring sample of the current sample, B) an upper neighboring sample and a lower neighboring sample, C) an upper left neighboring sample and a lower right neighboring sample, or D) an upper right neighboring sample and a lower left neighboring sample.
[0299] Clause 33: An apparatus according to clause 29, wherein the one or more processors are further configured to perform bilateral filtering (BIF) on the current sample using a fill value that replaces the value of the sample along the virtual boundary, the fill value including the value of one of the one or more samples that is not along any virtual boundary in the decoded block.
[0300] Clause 34: An apparatus according to clause 33, wherein the one or more processors are further configured to replace values of samples along or beyond any virtual boundary in the decoded block and within a filtering region of the samples with padding values determined from the one or more samples that are not along the virtual boundary in the decoded block.
[0301] Clause 35: The apparatus of clause 29, wherein the one or more processors are further configured to encode the current block prior to decoding the current block.
[0302] Clause 36: The apparatus of clause 29, further comprising a display configured to display the decoded video data.
[0303] Clause 37: The device of clause 29, wherein the device comprises one or more of a camera, a computer, a mobile device, a broadcast receiver device, or a set-top box.
[0304] Item 38: A computer-readable storage medium having instructions stored thereon, which when executed cause a processor to: decode a current block of video data to form a decoded block; determine that a current sample of the decoded block is adjacent to a sample along a virtual boundary in the decoded block and to one or more samples that are not along any virtual boundary in the decoded block; use at least one of the one or more samples that are not along any virtual boundary in the decoded block and do not use the samples along the virtual boundary to calculate band information for cross-component sample adaptive offset (CCSAO) for the current sample; and perform CCSAO on the current sample using the band information.
[0305] Clause 39: The computer-readable storage medium of clause 38, further comprising instructions that cause the processor to disable CCSAO for the samples along the virtual boundary.
[0306] Clause 40: A computer-readable storage medium according to clause 38, wherein the one or more samples that are not along any virtual boundary in the decoding block include a pair of relative adjacent samples, and wherein the instructions causing the processor to calculate the frequency band information include instructions causing the processor to calculate the frequency band information using the pair of relative adjacent samples.
[0307] Clause 41: A computer-readable storage medium according to clause 40, wherein the pair of relative adjacent samples is one of: A) a left adjacent sample and a right adjacent sample of the current sample, B) an upper adjacent sample and a lower adjacent sample, C) an upper left adjacent sample and a lower right adjacent sample, or D) an upper right adjacent sample and a lower left adjacent sample.
[0308] Clause 42: The computer-readable storage medium of clause 38, further comprising instructions causing the processor to perform bilateral filtering (BIF) on the current sample using a fill value that replaces the value of the sample along the virtual boundary, wherein the fill value includes the value of one of the one or more samples that is not along any virtual boundary in the decoded block.
[0309] Clause 43: A computer-readable storage medium according to clause 42, further comprising instructions that cause the processor to replace values of samples along or beyond any virtual boundary in the decoded block and within a filtering region of the samples with padding values determined from the one or more samples that are not along any virtual boundary in the decoded block.
[0310] Clause 44: The computer-readable storage medium of clause 38, further comprising instructions that cause the processor to encode the current block before decoding the current block.
[0311] Item 45: A device for decoding video data, the device comprising: a component for decoding a current block of video data to form a decoded block; a component for determining that a sample of the decoded block is adjacent to a sample along a virtual boundary in the decoded block and is adjacent to one or more samples that are not along any virtual boundary in the decoded block; a component for calculating band information for cross-component sample adaptive offset (CCSAO) for the sample using at least one of the one or more samples that are not along any virtual boundary in the decoded block and not using the samples along the virtual boundary; and a component for performing CCSAO on the sample using the band information.
[0312] Item 46: A method for decoding video data, the method comprising: decoding a current block of video data to form a decoded block; determining that a current sample of the decoded block is adjacent to a sample along a virtual boundary in the decoded block and is adjacent to one or more samples that are not along any virtual boundary in the decoded block; using at least one of the one or more samples that are not along any virtual boundary in the decoded block and not using the samples along the virtual boundary to calculate band information for cross-component sample adaptive offset (CCSAO) for the current sample; and performing CCSAO on the current sample using the band information.
[0313] Clause 47: The method of clause 46, further comprising disabling CCSAO for the samples along the virtual boundary.
[0314] Clause 48: A method according to any one of clauses 46 and 47, wherein the one or more samples that are not along any virtual boundary in the decoding block include a pair of relative adjacent samples, and wherein calculating the frequency band information includes calculating the frequency band information using the pair of relative adjacent samples.
[0315] Clause 49: A method according to clause 48, wherein the pair of relative adjacent samples is one of: A) a left adjacent sample and a right adjacent sample of the current sample, B) an upper adjacent sample and a lower adjacent sample, C) an upper left adjacent sample and a lower right adjacent sample, or D) an upper right adjacent sample and a lower left adjacent sample.
[0316] Clause 50: The method according to any one of clauses 46 to 49 further includes performing bilateral filtering (BIF) on the current sample using a fill value that replaces the value of the sample along the virtual boundary, wherein the fill value includes the value of one of the one or more samples that is not along any virtual boundary in the decoding block.
[0317] Clause 51: The method of clause 50, further comprising replacing values of samples along or beyond any virtual boundary in the decoded block and within a filtering region of the samples with padding values determined from the one or more samples not along the virtual boundary in the decoded block.
[0318] Clause 52: The method of any one of clauses 46 to 51, further comprising encoding the current block before decoding the current block.
[0319] Item 53: A device for decoding video data, the device comprising: a memory configured to store video data; and one or more processors implemented in a circuit and configured to: decode a current block of the video data to form a decoded block; determine that a current sample of the decoded block is adjacent to a sample along a virtual boundary in the decoded block and is adjacent to one or more samples that are not along any virtual boundary in the decoded block; use at least one of the one or more samples that are not along any virtual boundary in the decoded block and do not use the samples along the virtual boundary to calculate band information for cross-component sample adaptive offset (CCSAO) for the current sample; and perform CCSAO on the current sample using the band information.
[0320] Clause 54: The apparatus of clause 53, wherein the one or more processors are further configured to disable CCSAO for the samples along the virtual boundary.
[0321] Clause 55: A device according to any one of clauses 53 and 54, wherein the one or more samples that are not along any virtual boundary in the decoding block include a pair of relative adjacent samples, and wherein in order to calculate the frequency band information, the one or more processors are configured to calculate the frequency band information using the pair of relative adjacent samples.
[0322] Clause 56: An apparatus according to clause 55, wherein the pair of relative neighboring samples is one of the following: A) a left neighboring sample and a right neighboring sample of the current sample, B) an upper neighboring sample and a lower neighboring sample, C) an upper left neighboring sample and a lower right neighboring sample, or D) an upper right neighboring sample and a lower left neighboring sample.
[0323] Clause 57: An apparatus according to any one of clauses 53 to 56, wherein the one or more processors are further configured to perform bilateral filtering (BIF) on the current sample using a fill value that replaces the value of the sample along the virtual boundary, the fill value including the value of one of the one or more samples that is not along any virtual boundary in the decoded block.
[0324] Clause 58: An apparatus according to clause 57, wherein the one or more processors are further configured to replace values of samples along or beyond any virtual boundary in the decoded block and within a filtering region of the samples with padding values determined from the one or more samples that are not along the virtual boundary in the decoded block.
[0325] Clause 59: Apparatus as recited in any of clauses 53 to 58, wherein the one or more processors are further configured to encode the current block prior to decoding the current block.
[0326] Clause 60: Apparatus as recited in any one of clauses 53 to 59, further comprising a display configured to display the decoded video data.
[0327] Clause 61: The device of any of clauses 53 to 60, wherein the device comprises one or more of a camera, a computer, a mobile device, a broadcast receiver device, or a set-top box.
[0328] Item 62: A computer-readable storage medium having instructions stored thereon that, when executed, cause a processor to: decode a current block of video data to form a decoded block; determine that a current sample of the decoded block is adjacent to a sample along a virtual boundary in the decoded block and to one or more samples that are not along any virtual boundary in the decoded block; calculate band information for cross-component sample adaptive offset (CCSAO) for the current sample using at least one of the one or more samples that are not along any virtual boundary in the decoded block and not using the samples along the virtual boundary; and perform CCSAO on the current sample using the band information.
[0329] Clause 63: The computer-readable storage medium of clause 62, further comprising instructions that cause the processor to disable CCSAO for the samples along the virtual boundary.
[0330] Clause 64: A computer-readable storage medium according to any one of clauses 62 and 63, wherein the one or more samples that are not along any virtual boundary in the decoding block include a pair of relative adjacent samples, and wherein the instructions causing the processor to calculate the frequency band information include instructions causing the processor to calculate the frequency band information using the pair of relative adjacent samples.
[0331] Clause 65: A computer-readable storage medium according to clause 64, wherein the pair of relative adjacent samples is one of: A) a left adjacent sample and a right adjacent sample of the current sample, B) an upper adjacent sample and a lower adjacent sample, C) an upper left adjacent sample and a lower right adjacent sample, or D) an upper right adjacent sample and a lower left adjacent sample.
[0332] Clause 66: A computer-readable storage medium according to any one of clauses 62 to 65, further comprising instructions causing the processor to perform bilateral filtering (BIF) on the current sample using a fill value that replaces the value of the sample along the virtual boundary, wherein the fill value includes the value of one of the one or more samples that is not along any virtual boundary in the decoded block.
[0333] Clause 67: A computer-readable storage medium according to clause 66, further comprising instructions that cause the processor to replace values of samples along or beyond any virtual boundary in the decoding block and within a filtering region of the samples with padding values determined from the one or more samples that are not along any virtual boundary in the decoding block.
[0334] Clause 68: The computer-readable storage medium of any of clauses 62 to 67, further comprising instructions that cause the processor to encode the current block prior to decoding the current block.
[0335] It should be appreciated that, according to examples, certain actions or events of any technique described herein may be performed in a different order, may be added, combined, or omitted entirely (e.g., not all described actions or events are necessary to implement the technique). In addition, in some examples, actions or events may be performed concurrently (e.g., by multithreading, interrupt handling, or multiple processors) rather than sequentially.
[0336] In one or more examples, the described functions can be implemented in hardware, software, firmware, or any combination thereof. If implemented in software, the function can be stored as one or more instructions or codes on a computer-readable medium or sent via a computer-readable medium and executed by a hardware-based processing unit. A computer-readable medium may include a computer-readable storage medium (which corresponds to a tangible medium such as a data storage medium) or a communication medium, which includes, for example, any medium that facilitates the transfer of a computer program from one place to another according to a communication protocol. In this way, a computer-readable medium can generally correspond to (1) a non-transient tangible computer-readable storage medium, or (2) a communication medium such as a signal or carrier wave. A data storage medium can be any available medium that can be accessed by one or more computers or one or more processors to retrieve instructions, codes, and / or data structures for implementing the techniques described in the present disclosure. A computer program product may include a computer-readable medium.
[0337] By way of example and not limitation, such computer-readable storage media may include RAM, ROM, EEPROM, CD-ROM or other optical disk storage, disk storage or other magnetic storage devices, flash memory, or any other medium that can be used to store the desired program code in the form of instructions or data structures and can be accessed by a computer. In addition, any connection is appropriately referred to as a computer-readable medium. For example, if the instruction is sent from a website, server or other remote source using a coaxial cable, fiber optic cable, twisted pair, digital subscriber line (DSL) or wireless technology (such as infrared, radio and microwave), the coaxial cable, fiber optic cable, twisted pair, DSL or wireless technology (such as infrared, radio and microwave) is included in the definition of the medium. However, it should be understood that computer-readable storage media and data storage media do not include connections, carrier waves, signals or other transient media, but instead relate to non-transient tangible storage media. As used herein, disks and optical disks include compact discs (CDs), laser optical disks, optical disks, digital versatile discs (DVDs), floppy disks and blue-ray discs, wherein disks usually reproduce data magnetically, while optical disks reproduce data optically using lasers. Combinations of the above should also be included within the scope of computer-readable media.
[0338] Instructions may be executed by one or more processors, such as one or more digital signal processors (DSPs), general-purpose microprocessors, application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other equivalent integrated or discrete logic circuits. Therefore, the terms "processor" and "processing circuitry" as used herein may refer to any of the aforementioned structures or any other structure suitable for implementing the techniques described herein. In addition, in some aspects, the functionality described herein may be provided within dedicated hardware and / or software modules configured for encoding and decoding, or incorporated into a combined codec. In addition, these techniques may be fully implemented in one or more circuits or logic elements.
[0339] The techniques of the present disclosure may be implemented in a variety of devices or apparatuses, including a wireless handset, an integrated circuit (IC), or a set of ICs (e.g., a chipset). Various components, modules, or units are described in the present disclosure to emphasize functional aspects of a device configured to perform the disclosed techniques, but implementation by different hardware units is not necessarily required. Instead, as described above, the various units may be combined in a codec hardware unit, or the various units may be provided by a collection of interoperable hardware units (including one or more processors as described above) in combination with appropriate software and / or firmware.
[0340] Various examples have been described. These and other examples are within the scope of the following claims.
Claims
1. A method for decoding video data, the method comprising: decoding a current block of video data to form a decoded block; determining that a current sample of the decoding block is adjacent to a sample along a virtual boundary in the decoding block and is adjacent to one or more samples that are not along any virtual boundary in the decoding block; calculating band information for cross-component sample adaptive offset (CCSAO) for the current sample using at least one of the one or more samples not along any virtual boundary in the decoding block and not using the samples along the virtual boundary; as well as CCSAO is performed on the current sample using the frequency band information. 2 . The method of claim 1 , further comprising disabling CCSAO for the samples along the virtual boundary.
3. The method of claim 1, wherein the one or more samples that are not along any virtual boundary in the decoded block include a pair of opposing adjacent samples, and wherein calculating the frequency band information includes calculating the frequency band information using the pair of opposing adjacent samples.
4. The method according to claim 3, wherein the pair of relative neighboring samples is one of the following: A) a left neighboring sample and a right neighboring sample of the current sample, B) an upper neighboring sample and a lower neighboring sample, C) an upper left neighboring sample and a lower right neighboring sample, or D) an upper right neighboring sample and a lower left neighboring sample.
5. The method of claim 1 , further comprising performing bilateral filtering (BIF) on the current sample using a padding value that replaces the value of the sample along the virtual boundary, the padding value comprising the value of one of the one or more samples that is not along any virtual boundary in the decoded block.
6. The method of claim 5, further comprising replacing values of samples along or beyond any virtual boundary in the decoded block and within a filtering region of the samples with padding values determined from the one or more samples that are not along the virtual boundary in the decoded block.
7. The method of claim 1, further comprising encoding the current block before decoding the current block.
8. A device for decoding video data, the device comprising: a memory configured to store video data; and One or more processors implemented in circuitry and configured to: decoding a current block of the video data to form a decoded block; determining that a current sample of the decoding block is adjacent to a sample along a virtual boundary in the decoding block and is adjacent to one or more samples that are not along any virtual boundary in the decoding block; calculating band information for cross-component sample adaptive offset (CCSAO) for the current sample using at least one of the one or more samples not along any virtual boundary in the decoding block and not using the samples along the virtual boundary; as well as CCSAO is performed on the current sample using the frequency band information. 9 . The device of claim 8 , wherein the one or more processors are further configured to disable CCSAO for the samples along the virtual boundary.
10. The apparatus of claim 8, wherein the one or more samples that are not along any virtual boundary in the decoded block include a pair of relative adjacent samples, and wherein to calculate the frequency band information, the one or more processors are configured to calculate the frequency band information using the pair of relative adjacent samples.
11. The apparatus of claim 10, wherein the pair of relative neighboring samples is one of: A) a left neighboring sample and a right neighboring sample of the current sample, B) an upper neighboring sample and a lower neighboring sample, C) an upper left neighboring sample and a lower right neighboring sample, or D) an upper right neighboring sample and a lower left neighboring sample.
12. The apparatus of claim 8, wherein the one or more processors are further configured to perform bilateral filtering (BIF) on the current sample using a padding value that replaces a value of the sample along the virtual boundary, the padding value comprising the value of one of the one or more samples that is not along any virtual boundary in the decoded block.
13. The apparatus of claim 12, wherein the one or more processors are further configured to replace values of samples along or beyond any virtual boundary in the decoded block and within a filtering region of the samples with padding values determined from the one or more samples that are not along any virtual boundary in the decoded block.
14. The device of claim 8, wherein the one or more processors are further configured to encode the current block before decoding the current block.
15. The apparatus of claim 8, further comprising a display configured to display the decoded video data including the decoded blocks.
16. The device of claim 8, wherein the device comprises one or more of a camera, a computer, a mobile device, a broadcast receiver device, or a set-top box.
17. A computer-readable storage medium having stored thereon instructions which, when executed, cause a processor to: decoding a current block of video data to form a decoded block; determining that a current sample of the decoding block is adjacent to a sample along a virtual boundary in the decoding block and is adjacent to one or more samples that are not along any virtual boundary in the decoding block; calculating band information for cross-component sample adaptive offset (CCSAO) for the current sample using at least one of the one or more samples not along any virtual boundary in the decoding block and not using the samples along the virtual boundary; as well as CCSAO is performed on the current sample using the frequency band information.
18. The computer-readable storage medium of claim 17, further comprising instructions that cause the processor to disable CCSAO for the samples along the virtual boundary.
19. The computer-readable storage medium of claim 17, wherein the one or more samples that are not along any virtual boundary in the decoded block include a pair of opposing adjacent samples, and wherein the instructions that cause the processor to calculate the frequency band information include instructions that cause the processor to calculate the frequency band information using the pair of opposing adjacent samples.
20. The computer-readable storage medium of claim 19, wherein the pair of relative neighboring samples is one of: A) a left neighboring sample and a right neighboring sample of the current sample, B) an upper neighboring sample and a lower neighboring sample, C) an upper-left neighboring sample and a lower-right neighboring sample, or D) an upper-right neighboring sample and a lower-left neighboring sample.
21. The computer-readable storage medium of claim 17, further comprising instructions that cause the processor to perform bilateral filtering (BIF) on the current sample using a padding value that replaces the value of the sample along the virtual boundary, the padding value comprising the value of one of the one or more samples that is not along any virtual boundary in the decoded block.
22. The computer-readable storage medium of claim 21 , further comprising instructions that cause the processor to replace values of samples along or beyond any virtual boundary in the decoded block and within a filtering region of the samples with padding values determined from the one or more samples that are not along the virtual boundary in the decoded block.
23. The computer-readable storage medium of claim 17, further comprising instructions that cause the processor to encode the current block before decoding the current block.
24. A device for decoding video data, the device comprising: means for decoding a current block of video data to form a decoded block; means for determining that samples of the decoding block are adjacent to samples along a virtual boundary in the decoding block and are adjacent to one or more samples not along any virtual boundary in the decoding block; means for calculating band information for cross-component sample adaptive offset (CCSAO) for the sample using at least one of the one or more samples that are not along any virtual boundary in the decoded block and not using the samples along the virtual boundary; and Means for performing CCSAO on the samples using the frequency band information.
