Cross-component adaptive loop filter in video coding
By processing unusable luminance samples in video decoding, such as replacement or mirroring, the problem of CC-ALF unavailability under different sample formats and buffer configurations is solved, improving the filtering quality and performance of video encoders and decoders. .
Patent Information
- Application Number
- CN202410807926.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2020-11-12
- Filing Date
- 2020-11-13
- Publication Date
- 2024-09-06
AI Technical Summary
In video decoding, due to the limitations of different sample chroma subsampling formats and buffer sizes, the samples required for cross-component adaptive loop filter (CC-ALF) may not be available, especially between chroma samples and CC-ALF is disabled when co-located luminance samples are located on different virtual boundaries.
By determining the unavailable luminance samples, use replacement or mirroring methods to process the unavailable luminance samples, such as using the nearest luminance sample or mirror sample in the same ALF unit, or bypassing filtering in different ALF units to ensure that the video data efficient decoding and filtering.
Improves the filtering quality and performance of video encoders and decoders, ensures the effectiveness of CC-ALF under different sample formats and buffer configurations, and avoids filtering failures due to sample unavailability.
Smart Images

Figure CN118612427A_ABST
Abstract
Description
[0001] This application is a divisional application of the invention patent application with the application date of November 13, 2020, application number 202080076657.X, and name “Cross-component adaptive loop filter in video decoding”.
[0002] This application claims the benefit of U.S. Application No. 17 / 096,740 filed on November 12, 2020, U.S. Provisional Application No. 62 / 936,046 filed on November 15, 2019, and U.S. Provisional Application No. 62 / 985,684 filed on March 5, 2020, the entire contents of which are incorporated herein by reference. Technical Field
[0003] The present disclosure relates to video encoding and video decoding. Background Art
[0004] Digital video functionality may be integrated into a variety of devices, including digital televisions, digital direct broadcast systems, wireless broadcast systems, personal digital assistants (PDAs), laptop or desktop computers, tablet computers, e-book readers, digital cameras, digital recording devices, digital media players, video game devices, video game consoles, cellular or satellite wireless telephones, so-called "smart phones", video teleconferencing devices, video streaming devices. Digital video devices implement video coding techniques, such as those described in the standards defined by MPEG-2, MPEG-4, ITU-T H.263, ITU-T H.264 / MPEG-4 Part 10, Advanced Video Coding (AVC), ITU-T H.265 / High Efficiency Video Coding (HEVC), and extensions of such standards. Video devices may more efficiently send, receive, encode, decode, and / or store digital video information by implementing such video coding techniques.
[0005] Video coding techniques include spatial (intra-frame) prediction and / or temporal (inter-frame) prediction to reduce or eliminate 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 an intra-coded (I) slice of a picture are encoded using spatial prediction with respect to reference samples in neighboring blocks in the same picture. Video blocks in an inter-coded (P or B) slice of a picture may use spatial prediction with respect to reference samples in neighboring blocks in the same picture, or temporal prediction with respect to reference samples in other reference pictures. Pictures may be referred to as frames, and reference pictures may be referred to as reference frames. Summary of the invention
[0006] In general, this disclosure describes techniques related to cross-component adaptive loop filter (CC-ALF) filtering techniques for video coding. In CC-ALF, a video coder may use co-located luma samples to improve chroma samples. For example, a video coder may filter chroma samples using adaptive loop filtering, and the video coder may use luma samples to improve the resulting filtered chroma samples. Improving chroma samples may occur before adaptive loop filtering of chroma samples (i.e., chroma samples may be improved and then filtered, or filtered and then improved).
[0007] Due to different sample chroma subsampling formats (e.g., 4:4:4, 4:2:2, or 4:2:0 formats) and buffer size limitations, some samples required for CC-ALF may not be available in the line buffer (which may store coding tree unit (CTU) rows). For example, chroma samples and co-located luma samples may be located on different sides of the ALF virtual boundary, or may be located in different line buffers. The present disclosure describes examples of practical applications of performing CC-ALF to address the problem of unavailability of samples required for CC-ALF. The example techniques may be used in existing video coding standards, such as the High Efficiency Video Coding (HEVC) standard or the Versatile Video Coding (VVC) standard. The techniques of the present disclosure are not limited to a specific video coding standard and may be used as part of video coding (encoding and / or decoding) according to various video coding standards.
[0008] In one example, a method of decoding video data includes decoding a coding tree unit (CTU) of the video data, the CTU including a luma block and a chroma block to generate a decoded luma block and a decoded chroma block; determining that a chroma sample of the decoded chroma block is on a first side of an adaptive loop filter (ALF) virtual boundary, and a co-located luma sample of the decoded luma block is on a second side of the ALF virtual boundary, the co-located luma sample being co-located with the chroma sample, the first side being different from the second side; and in response to the determining that the chroma sample is on the first side and the luma sample is on the second side, disabling cross-component adaptive loop filtering (CC-ALF) for the chroma sample.
[0009] In another example, an apparatus 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 coding tree unit (CTU) of the video data, the CTU including a luma block and a chroma block to generate a decoded luma block and a decoded chroma block; determine that a chroma sample of the decoded chroma block is on a first side of an adaptive loop filter (ALF) virtual boundary, and a co-located luma sample of the decoded luma block is on a second side of the ALF virtual boundary, the co-located luma sample being co-located with the chroma sample, the first side being different from the second side; and in response to the determination that the chroma sample is on the first side and the luma sample is on the second side, disable cross-component adaptive loop filtering (CC-ALF) for the chroma sample.
[0010] In another example, a computer-readable storage medium has instructions stored thereon that, when executed, cause a processor to decode a coding tree unit (CTU) of video data, the CTU including a luma block and a chroma block to produce a decoded luma block and a decoded chroma block; determine that a chroma sample of the decoded chroma block is on a first side of an adaptive loop filter (ALF) virtual boundary, and a co-located luma sample of the decoded luma block is on a second side of the ALF virtual boundary, the co-located luma sample being co-located with the chroma sample, the first side being different from the second side; and in response to determining that the chroma sample is on the first side and the luma sample is on the second side, disable cross-component adaptive loop filtering (CC-ALF) for the chroma sample.
[0011] In another example, an apparatus for decoding video data includes a unit for decoding a coding tree unit (CTU) of the video data, the CTU including a luma block and a chroma block to generate a decoded luma block and a decoded chroma block; a unit for determining that a chroma sample of the decoded chroma block is on a first side of an adaptive loop filter (ALF) virtual boundary, and a co-located luma sample of the decoded luma block is on a second side of the ALF virtual boundary, the co-located luma sample being co-located with the chroma sample, the first side being different from the second side; and a unit for disabling cross-component adaptive loop filtering (CC-ALF) for the chroma sample in response to determining that the chroma sample is on a first side and the luma sample is on a second side.
[0012] The details of one or more examples are set forth in conjunction with the accompanying drawings and the description below. Other features, objects, and advantages will be apparent in the description, drawings, and claims. BRIEF DESCRIPTION OF THE DRAWINGS
[0013] Figure 1 is a block diagram illustrating an example video encoding and decoding system that may perform the techniques of this disclosure.
[0014] Figure 2A and 2B is a conceptual diagram illustrating an example quadtree binary tree (QTBT) structure and a corresponding coding tree unit (CTU).
[0015] Figure 3 is a block diagram illustrating an example video encoder that may perform the techniques of this disclosure.
[0016] Figure 4 is a block diagram illustrating an example video decoder that may perform the techniques of this disclosure.
[0017] Figure 5 is a block diagram illustrating a cross-component adaptive loop filter (CC-ALF) reconstruction stage.
[0018] Figure 6 is a conceptual diagram illustrating an example of a 4x3 filter used for CC-ALF.
[0019] Figure 7 is a conceptual diagram illustrating an example of a 5x5 filter used for CC-ALF.
[0020] Figure 8 is a conceptual diagram illustrating an example of an ALF processing unit in which 4 lines of luma samples and 2 lines of chroma samples are above a CTU boundary.
[0021] Fig. 9 is a conceptual diagram illustrating an example of an ALF processing unit in which 4 lines of luma samples and 2 lines of chroma samples are arranged above a CTU boundary, and 4 columns of luma samples and 2 lines of chroma samples are arranged to the left of the CTU boundary.
[0022] Fig.10 and 11 is a conceptual diagram illustrating the undefined CC-ALF behavior when the current chroma sample and its co-located luma sample are in different ALF units.
[0023] Fig.12 is a conceptual diagram illustrating an example of unavailable luma pixels being filled with available luma samples using repeated filling.
[0024] Fig.13 is a conceptual diagram illustrating an example of mirror filling.
[0025] Fig.14 is a conceptual diagram illustrating an example in which the nearest luma sample in the same ALF line buffer side is used as a new co-located luma sample.
[0026] Fig.15 is a conceptual diagram illustrating an example in which mirror luma samples in the same ALF line side are used as new co-located luma samples.
[0027] Fig.16 is a conceptual diagram illustrating an example in which the most recent luma sample in the same ALF line buffer is used as a new co-located luma sample.
[0028] Fig.17 is a flow chart illustrating an example method for encoding a current block of video data.
[0029] Fig.18 is a flow chart illustrating an example method for decoding a current block of video data.
[0030] Fig.19 is a flowchart illustrating an example method for decoding and filtering video data according to the techniques of this disclosure. DETAILED DESCRIPTION
[0031] Figure 1 is a block diagram illustrating an example video encoding and decoding system that can perform the techniques of the present disclosure. The techniques of the present disclosure are generally directed to decoding (encoding and / or decoding) video data. In general, video data includes any data used to process video. Therefore, video data can include original unencoded video, encoded video, decoded (e.g., reconstructed) video, and video metadata, such as signaling data.
[0032] like Figure 1 As shown, in this example, the system 100 includes a source device 102, which provides encoded video data, which is decoded and displayed by a target device 116. Specifically, the source device 102 provides the video data to the target device 116 through a computer-readable medium 110. The source device 102 and the target device 116 may include a variety of devices, including desktop computers, notebooks (i.e., laptop computers), tablet computers, set-top boxes, telephone handsets (e.g., smart phones), televisions, cameras, display devices, digital media players, video game consoles, video streaming devices, etc. In some cases, the source device 102 and the target device 116 may be used for wireless communication and may therefore be referred to as wireless communication devices.
[0033] exist Figure 1In the example of , source device 102 includes video source 104, memory 106, video encoder 200 and output interface 108. Target 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 target device 116 can be configured to apply cross-component adaptive loop filtering (CC-ALF) technology in video decoding. Therefore, source device 102 represents an example of a video decoding device, and target device 116 represents an example of a video decoding device. In other examples, the source device and the target device may include other components or arrangements. For example, source device 102 can receive video data from an external video source, such as an external camera. Similarly, target device 116 can be docked with an external display device instead of including an integrated display device.
[0034] Figure 1 The system 100 shown is only an example. In general, any digital video encoding and / or decoding device can perform the technology for CC-ALF in video decoding. The source device 102 and the target device 116 are only examples of such decoding devices, wherein the source device 102 generates decoded video data to be transmitted to the target device 116. The present disclosure relates to a "decoding" device as a device that performs decoding (encoding and / or decoding) of data. Therefore, in particular, the video encoder 200 and the video decoder 300 represent examples of decoding devices (especially, video encoders and video decoders), respectively. In some examples, the source device 102 and the target device 116 can operate in a substantially symmetrical manner, so that each of the source device 102 and the target 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 target device 116, for example, for video streaming, video playback, video broadcasting or video telephony.
[0035] In general, the video source 104 represents a source of video data (i.e., raw, unencoded video data) and provides a series of consecutive pictures (also referred to as "frames") of video data to the video encoder 200, which encodes the data for the pictures. The video source 104 of the source device 102 may include a video capture device, such as a camera, a video archive containing previously captured raw video, and / or a video feed interface for receiving video from a video content provider. As a further alternative, the video source 104 may generate computer graphics-based data as an original video, or a combination of live video, archived video, and computer-generated video. In each case, the video encoder 200 encodes the captured, pre-captured, or computer-generated video data. The video encoder 200 may rearrange the pictures from the order in which they are received (sometimes referred to as the "display order") into a decoding order for decoding. The video encoder 200 may generate a bitstream containing 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 target device 116 .
[0036] The memory 106 of the source device 102 and the memory 120 of the target device 116 represent general purpose memory. In some examples, the memories 106, 120 can store original video data, such as original video from the video source 104 and original 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 can also include internal memory for functionally similar or equivalent purposes. In addition, the memories 106, 120 can store encoded video data, such as video data output from the video encoder 200 and input to the video decoder 300. In some examples, portions of the memories 106, 120 can be configured as one or more video buffers, for example to store original, decoded and / or encoded video data.
[0037] 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 target device 116. In one example, the computer-readable medium 110 represents a communication medium that enables the source device 102 to directly send the encoded video data to the target device 116 in real time, for example, via a radio frequency network or based on a computer network. According to a communication standard such as a wireless communication protocol, the output interface 108 can modulate a transmission signal including the encoded video data, and the input interface 122 can 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 part of a packet-based network, such as a local area network, a wide area network, or a global network, such as the Internet. The communication medium may include a router, a switch, a base station, or any other device that can be used to facilitate communication from the source device 102 to the target device 116.
[0038] In some examples, source device 102 may output the encoded data from output interface 108 to storage device 112. Similarly, target 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.
[0039] In some examples, source device 102 may output the encoded video data to file server 114 or other intermediate storage device that may store the encoded video generated by source device 102. Target device 116 may access the stored video data from file server 114 via streaming or downloading. File server 114 may be any type of server device capable of storing the encoded video data and sending the encoded video data to target device 116. File server 114 may represent a network server (e.g., for a website), a file transfer protocol (FTP) server, a content distribution network device, or a network attached storage (NAS) device. Target device 116 may access the encoded video data from file server 114 via 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. File server 114 and input interface 122 may be configured to operate according to a streaming protocol, a download transmission protocol, or a combination thereof.
[0040] Output interface 108 and input interface 122 may represent wireless transmitters / receivers, modems, wired network 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 transmit 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 transmit data, such as encoded video data, according to a cellular communication standard such as IEEE 802.11 specifications, IEEE 802.15 specifications (e.g., ZigBee 5G, etc.). TM ),Bluetooth TM The source device 102 and / or the target device 116 may include respective system-on-chip (SoC) devices. For example, the source device 102 may include a SoC device to perform the functions of the video encoder 200 and / or the output interface 108, and the target device 116 may include a SoC device to perform the functions of the video decoder 300 and / or the input interface 122.
[0041] The techniques of the present disclosure may be applied to video decoding to support a variety of multimedia applications, such as over-the-air television broadcasting, cable television transmission, satellite television transmission, Internet streaming video transmission, e.g., Dynamic Adaptive Streaming over HTTP (DASH), encoding of digital video for storage on a data storage medium, decoding of digital video stored on a data storage medium, or other applications.
[0042] The input interface 122 of the target device 116 receives the 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, which may also be used by the video decoder 300, such as syntax elements describing the characteristics and / or processing of video blocks or other decoded units (e.g., slices, groups of pictures, sequences, etc.). The display device 118 displays the decoded pictures of the decoded video data to the user. The display device 118 may be any of a variety of display devices, such as a cathode ray tube (CRT), a liquid crystal display (LCD), a plasma display, an organic light emitting diode (OLED) display, or other types of display devices.
[0043] Although in Figure 1Not shown in the figure, in some examples, the video encoder 200 and the video decoder 300 can each be integrated with an audio encoder and / or an audio decoder, and can include suitable MUX-DEMUX units or other hardware and / or software to process multiplexed streams including audio and video in a common data stream. If applicable, the MUX-DEMUX unit can comply with the ITU H.223 multiplexer protocol or other protocols, such as the User Datagram Protocol (UDP).
[0044] The video encoder 200 and the video decoder 300 may be 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 units, software, hardware, firmware, or any combination thereof. When these techniques are partially implemented in software, the device may store instructions for the software in a suitable non-transitory computer-readable medium and use one or more processors to execute the instructions in hardware to implement the techniques disclosed in the present disclosure. Each of the video encoder 200 and the video decoder 300 may be included in one or more encoders or decoders, or may 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.
[0045] 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 a multi-view and / or scalable video coding extension. Alternatively, the video encoder 200 and the video decoder 300 may operate according to other proprietary or industry standards, such as the Joint Exploration Test Model (JEM) or ITU-T H.266, also known as Versatile Video Coding (VVC). The latest draft of the VVC standard is described in Bross et al., "Versatile Video Coding (Draft 7)", Joint Video Experts Group (JVET) of ITU-T SG16 WP 3 and ISO / IEC JTC 1 / SC29 / WG 11, 16th Meeting: Geneva, Switzerland, October 1-11, 2019, JVET-P2001-v9 (hereinafter referred to as "VVC Draft 7"). Another draft of the VVC standard is described in Bross et al., "Versatile Video Coding (Draft 8)", Joint Video Experts Group (JVET) of ITU-T SG16 WP3 and ISO / IEC JTC 1 / SC 29 / WG 11: 17th Meeting: Brussels, Belgium, January 7-17, 2020, JVET-Q2001-vD (hereinafter referred to as "VVC Draft 8"). However, the techniques of the present disclosure are not limited to any particular coding standard.
[0046] In general, the video encoder 200 and the video decoder 300 can perform block-based decoding of pictures. The term "block" generally refers to a structure that includes data to be processed (e.g., encoded, decoded, or otherwise used in an encoding and / or decoding process). For example, a block may include a two-dimensional matrix of luminance (luma) and / or chrominance (chroma) data samples. In general, the video encoder 200 and the video decoder 300 can decode video data in a YUV (e.g., Y, Cb, Cr) format. That is, the video encoder 200 and the video decoder 300 can decode luminance and chrominance components instead of decoding red, green, and blue (RGB) data of picture samples, where the chrominance components may include red hue and blue hue chrominance components. In some examples, the video encoder 200 converts the received RGB formatted data into a YUV representation before encoding, and the video decoder 300 converts the YUV representation into an RGB format. Alternatively, a pre-processing and post-processing unit (not shown) can perform these conversions.
[0047] The present disclosure generally relates to the decoding (e.g., encoding and decoding) of a picture, including the process of encoding or decoding the data of a picture. Similarly, the present disclosure relates to the decoding of blocks of a picture, including the process of encoding or decoding the data of the block, for example, prediction and / or residual decoding. The encoded video bitstream generally includes a series of values of syntax elements representing decoding decisions (e.g., decoding modes) and partitioning of the picture into blocks. Therefore, references to decoding a picture or a block should generally be understood as the decoded values of the syntax elements used to form the picture or block.
[0048] HEVC defines various blocks, including coding units (CUs), prediction units (PUs), and transform units (TUs). According to HEVC, a video decoder (e.g., 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 CU into four equal, non-overlapping squares, and each node of the quadtree has zero or four child nodes. A node without child nodes may be referred to as a "leaf node," and the 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, the residual quadtree (RQT) represents the division of the TU. In HEVC, PU represents inter-frame prediction data, and TU represents residual data. An intra-predicted CU includes intra-frame prediction information, such as an intra-frame mode indication.
[0049] As another example, the video encoder 200 and the video decoder 300 may be configured to operate according to JEM or VVC. According to JEM or VVC, a video decoder (e.g., video encoder 200) divides a picture into a plurality of coding tree units (CTUs). The video encoder 200 may divide the CTUs according to a tree structure such as a quadtree-binary tree (QTBT) structure or a multi-type tree (MTT) structure. The QTBT structure removes the concept of multiple partition types, such as the distinction between CU, PU, and TU of HEVC. The QTBT structure includes two levels: the first level is divided according to a quadtree, and the second level is divided according to a binary tree. The root node of the QTBT structure corresponds to the CTU. The leaf nodes of the binary tree correspond to coding units (CUs).
[0050] 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. Ternary tree partitioning is a partition in which a block is divided into three sub-blocks. In some examples, ternary tree or ternary tree partitioning divides a 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.
[0051] In some examples, the video encoder 200 and the video decoder 300 may use a single QTBT or MTT structure to represent each of the luma and chroma components, while in other examples, the video encoder 200 and the video decoder 300 may use two or more QTBT or MTT structures, such as one QTBT / MTT structure for the luma component and another QTBT / MTT structure for the two chroma components (or two QTBT / MTT structures for the corresponding chroma components, respectively).
[0052] The video encoder 200 and the video decoder 300 may be configured to use quadtree partitioning, QTBT partitioning, MTT partitioning, or other partitioning structures per HEVC. For purposes of explanation, the description of the techniques of the present disclosure is given with respect to QTBT partitioning. However, it should be appreciated that the techniques of the present disclosure may also be applied to video decoders configured to use quadtree partitioning or other types of partitioning.
[0053] In some examples, a CTU includes a coding tree block (CTB) of luma samples, two corresponding CTBs of chroma samples for a picture with three sample arrays, or a CTB of monochrome picture samples or a picture coded using three independent color planes and syntax structures for coding the samples. For some value of N, the CTB can be an NxN sample block, so that partitioning a component into multiple CTBs is a partition. A component is an array or a single sample from one of the three arrays (luminance and two chroma) that make up a picture in 4:2:0, 4:2:2, or 4:4:4 color format, or an array or a single sample of an array that makes up a monochrome format picture. In some examples, for some values of M and N, the coding block is an MxN sample block, so that partitioning a CTB into multiple coding blocks is a partition.
[0054] Blocks (e.g., CTUs or CUs) may be grouped in various ways in a picture. As an example, a brick may refer to a rectangular 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., 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., in a picture parameter set) and a width equal to the width of the picture.
[0055] In some examples, a tile may be divided into multiple bricks, each of which may include one or more CTU rows within the tile. A tile that is not divided into multiple bricks may also be referred to as a brick. However, a brick that is a true subset of a tile may not be referred to as a tile.
[0056] The blocks in a picture can also be arranged into slices. A slice can be an integer number of bricks of a picture that can be contained individually in a single network abstraction layer (NAL) unit. In some examples, a slice includes a continuous sequence of multiple complete tiles or only complete bricks of one tile.
[0057] This disclosure may use "NxN" and "N times N" interchangeably to refer to the sample dimensions of a block (such as a CU or other video block) in terms of 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 NxN CU 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, the number of samples in the horizontal direction of a CU is not necessarily the same as the number of samples in the vertical direction. For example, a CU may contain NxM samples, where M is not necessarily equal to N.
[0058] The video encoder 200 encodes the video data of the CU representing the prediction and / or residual information and other information. The prediction information indicates how the CU will be predicted 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.
[0059] In order to predict a CU, the video encoder 200 may typically form a prediction block for the CU by inter-frame prediction or intra-frame prediction. Inter-frame prediction generally refers to predicting a CU from data of a previously decoded picture, while intra-frame prediction generally refers to predicting a CU from 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 typically perform a motion search to identify a reference block that closely matches the CU, for example, in terms of 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.
[0060] Some examples of JEM and VVC also provide an affine motion compensation mode, which can be considered as 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 enlargement or reduction, rotation, perspective motion, or other irregular motion types.
[0061] To perform intra prediction, the video encoder 200 can select an intra prediction mode to generate a prediction block. Some examples of JEM and VVC provide 67 intra prediction modes, including various directional modes, as well as plane modes and DC modes. In general, the video encoder 200 selects an intra prediction mode that describes the neighboring samples of the current block (e.g., a block of a CU) and predicts the samples of the current block based on it. Assuming that the video encoder 200 decodes the CTU and CU in a raster scan order (from left to right, from top to bottom), such samples can typically be above and / or to the left of the current block in the same picture as the current block.
[0062] 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 can encode data indicating which of a plurality of available inter-frame prediction modes is used, and motion information for the corresponding mode. For unidirectional or bidirectional inter-frame prediction, for example, the video encoder 200 can encode motion vectors using advanced motion vector prediction (AMVP) or merge mode. The video encoder 200 can use a similar mode to encode motion vectors for affine motion compensation mode.
[0063] After a prediction such as intra prediction or inter prediction of a block, the video encoder 200 may calculate residual data for the block. Residual data such as a residual block represents a sample-by-sample difference between a block and a prediction block formed using a corresponding prediction mode for the block. The video encoder 200 may apply one or more transforms to the residual block to generate transformed data in a transform domain rather than a sample domain. For example, the video encoder 200 may apply a discrete cosine transform (DCT), an integer transform, a wavelet transform, or a conceptually similar transform to the residual video data. In addition, the video encoder 200 may 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.
[0064] As described above, after any transforms that produce transform coefficients, the video encoder 200 may perform quantization of the transform coefficients. Quantization generally refers to the process of quantizing transform coefficients to potentially reduce the amount of data used to represent the transform coefficients, thereby providing further compression. By performing the quantization process, the video encoder 200 may reduce the bit depth associated with some or all of the transform coefficients. For example, the video encoder 200 may round off an n-bit value to an m-bit value during quantization, where n is greater than m. In some examples, to perform quantization, the video encoder 200 may perform a bitwise right shift of the value to be quantized.
[0065] After quantization, the video encoder 200 may scan the transform coefficients to produce a one-dimensional vector from a two-dimensional matrix including the quantized transform coefficients. The scan may be designed to place transform coefficients of higher energy (and therefore lower frequency) at the front of the vector and transform coefficients of lower energy (and therefore higher frequency) at the back of the vector. In some examples, the video encoder 200 may scan the quantized transform coefficients using a predefined scan order to produce 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 for use by the video decoder 300 when decoding the video data.
[0066] To perform CABAC, the video encoder 200 may assign context within a context model to a symbol to be transmitted. For example, the context may relate to whether the neighboring values of the symbol are zero values. The probability determination may be based on the context assigned to the symbol.
[0067] The video encoder 200 may further generate syntax data such as block-based syntax data, picture-based syntax data, and sequence-based syntax data in, for example, a picture header, a block header, a slice header, or other syntax data, such as a sequence parameter set (SPS), a picture parameter set (PPS), or a video parameter set (VPS), to the video decoder 300. The video decoder 300 may also decode such syntax data to determine how to decode the corresponding video data.
[0068] In this way, the video encoder 200 can generate a bitstream containing encoded video data, for example, a syntax element describing the division 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.
[0069] In general, the video decoder 300 performs a process that is opposite to the process performed by the video encoder 200 to decode the encoded video data of the bitstream. For example, the video decoder 300 may use CABAC to decode the values of the syntax elements of the bitstream in a manner substantially similar to but opposite to the CABAC encoding process of the video encoder 200. The syntax elements may define the partitioning information of the picture into CTUs, and partition each CTU according to a corresponding partitioning structure (e.g., a QTBT structure) to define a CU of the CTU. The syntax elements may further define prediction and residual information for a video data block (e.g., a CU).
[0070] For example, the residual information may be represented by quantized transform coefficients. The video decoder 300 may inverse quantize and inverse transform the quantized transform coefficients of the block to reproduce the residual block of the block. The video decoder 300 uses the signaled prediction mode (intra-frame 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, for example, performing deblocking to reduce visual artifacts along block boundaries.
[0071] In some examples, the video encoder 200 and the video decoder 300 may include a filter unit configured to perform filtering such as deblocking filtering, sample adaptive offset (SAO) filtering, and / or adaptive loop filtering. The video encoder 200 and the video decoder 300 may perform adaptive loop filtering on the luma samples and chroma samples of the reconstructed block. For example, as part of its decoding loop, the video encoder 200 may reconstruct the block (e.g., in the same manner as the video decoder 300 will reconstruct the block), and the video encoder 200 may apply adaptive loop filtering to the luma and chroma samples of the reconstructed block, and then store the filtered reconstructed block in a decoded picture buffer (e.g., for use in a reference picture for subsequent inter-frame prediction). The video decoder 300 may reconstruct the block (e.g., by adding residual information to the prediction block) and apply adaptive loop filtering to the luma and chroma samples, and then store the filtered reconstructed samples, and also output the filtered reconstructed samples.
[0072] According to the techniques of the present disclosure, the video encoder 200 and the video decoder 300 may perform cross-component adaptive loop filtering (CC-ALF). In cross-component adaptive loop filtering, the video encoder 200 and the video decoder 300 may use luma samples to improve adaptive loop filtering of chroma samples (e.g., first improve chroma samples and then perform adaptive loop filtering or first perform adaptive loop filtering and then perform improved chroma samples).
[0073] In general, the video encoder 200 and the video decoder 300 decode picture blocks in a raster scan order (e.g., from left to right and from top to bottom). After completing the decoding of a CTU row, the video encoder 200 and the video decoder 300 may flush samples of the CTU row from memory before continuing to decode blocks in a subsequent CTU row. However, the present disclosure recognizes that in some cases, samples for CC-ALF may exist in the cleared portion above the current CTU line, which means that the samples required for CC-ALF may have been flushed from memory.
[0074] Additionally or alternatively, luma samples for cross-component adaptive loop filtering may not be available due to a chroma sampling format (e.g., 4:4:4) or a subsampling format (e.g., 4:2:2 or 4:2:0). For example, the size of a line or column buffer storing sample values for cross-component adaptive loop filtering may be limited, and thus some luma samples to be used for cross-component adaptive loop filtering of chroma samples may not be stored.
[0075] The present disclosure describes example techniques with practical applications to address such issues with cross-component adaptive loop filtering. The example techniques may result in higher quality filtering and / or better performance of the video encoder 200 and the video decoder 300. For example, a video decoder (e.g., the video encoder 200 or the video decoder 300) may be configured to determine that one or more luma samples for cross-component adaptive loop filtering of chroma samples are unavailable, and at least one of: (1) replacing one or more unavailable luma samples with one or more available luma samples and performing cross-component adaptive loop filtering on the chroma samples with the one or more available luma samples, (2) performing cross-component adaptive loop filtering on the chroma samples without replacing one or more unavailable luma samples, or (3) bypassing cross-component adaptive loop filtering on the chroma samples.
[0076] In a specific example, the video encoder 200 and the video decoder 300 may be configured to decode a CTU of video data, the CTU including a luma block and a chroma block (e.g., at least one chroma block, such as including two chroma blocks) to generate a decoded luma block and a decoded chroma block. The video encoder 200 and the video decoder 300 may determine that the chroma samples of the decoded chroma block are on a first side of an adaptive loop filter (ALF) virtual boundary and the co-located luma samples of the decoded luma block are on a second side of the ALF virtual boundary, the co-located luma samples are co-located with the chroma samples, and the first side is different from the second side. The ALF virtual boundary (also referred to herein as the ALF unit boundary) represents a boundary around a set of samples that can be used to perform ALF (e.g., CC-ALF) on other samples within the ALF virtual boundary. For example, when processing the next CTU line, samples above the ALF virtual boundary may be cleared in the memory of the encoder and decoder. However, this may mean that some luma samples that were originally used for CC-ALF are not available, for example, when chroma samples are on one side of the ALF virtual boundary and luma samples are on the other side of the ALF virtual boundary. Therefore, in response to determining that the chroma samples are on the first side and the luma samples are on the second side, the video encoder 200 and the video decoder 300 can disable CC-ALF for the chroma samples.
[0077] The present disclosure may generally refer to "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, the video encoder 200 may signal the values of syntax elements in a bitstream. Generally speaking, signaling refers to generating values in a bitstream. As described above, the source device 102 may transmit the bitstream to the target device 116 in substantially real time or non-real time, such as may occur when storing syntax elements to the storage device 112 for later retrieval by the target device 116.
[0078] Figure 2A and 2B 1 is a conceptual diagram illustrating an example quadtree binary tree (QTBT) structure 130 and a corresponding coding tree unit (CTU) 132. Solid lines represent quadtree partitions and dashed lines indicate binary tree partitions. In each partition (i.e., non-leaf) node of the binary tree, a flag is signaled to indicate which partition type (i.e., horizontal or vertical) is used, where 0 indicates horizontal partition and 1 indicates vertical partition in this example. For quadtree partitions, the partition type does not need to be specified because the quadtree node partitions a block horizontally and vertically into 4 equally sized sub-blocks. Therefore, the video encoder 200 can encode and the video decoder 300 can decode syntax elements (e.g., partition information) for the region tree level (i.e., solid lines) of the QTBT structure 130 and syntax elements (e.g., partition information) for the prediction tree level (i.e., dashed lines) of the QTBT structure 130. For the CU represented by the terminal leaf node of the QTBT structure 130, the video encoder 200 can encode and the video decoder 300 can decode video data, such as prediction and transform data.
[0079] Generally speaking, Figure 2B The CTU 132 may be associated with parameters defining block sizes corresponding to nodes at the first and second levels of the QTBT structure 130. These parameters may include a CTU size (indicating the size of the CTU 132 in samples), a minimum quadtree size (MinQTSize, indicating the minimum allowed quadtree leaf node size), a maximum binary tree size (MaxBTSize, indicating the maximum allowed binary tree root node size), a maximum binary tree depth (MaxBTDepth, indicating the maximum allowed binary tree depth), and a minimum binary tree size (MinBTSize, indicating the minimum allowed binary tree leaf node size).
[0080] The root node of the QTBT structure corresponding to the CTU can have four child nodes at the first level of the QTBT structure, and each of the four child nodes can be divided according to the quadtree partitioning. That is, the first-level node is either a leaf node (no child nodes) or has four child nodes. The example of the QTBT structure 130 represents a node including a parent node and a child node, which has a solid line for branching. If the node of the first level is not larger than the maximum allowed binary tree root node size (MaxBTSize), the node can be further divided into a corresponding binary tree. The binary tree partitioning of a node can be iterated until the node obtained by the partition reaches the minimum allowed binary tree leaf node size (MinBTSize) or the maximum allowed binary tree depth (MaxBTDepth). The example of the QTBT structure 130 represents such a node as having a dotted line for branching. The leaf node of the binary tree is called a coding unit (CU), which is used for prediction (e.g., intra-screen or inter-screen prediction) and transformation without any further partitioning. As described above, a CU may also be referred to as a "video block" or "block".
[0081] In one example of a QTBT partitioning structure, the CTU size is set to 128x128 (luminance sample and two corresponding 64x64 chrominance samples), MinQTSize is set to 16x16, MaxBTSize is set to 64x64, MinBTSize (for both width and height) is set to 4, and MaxBTDepth is set to 4. Quadtree partitioning is first applied to the CTU to generate quadtree leaf nodes. The size of the quadtree leaf node can range from 16x16 (i.e., MinQTSize) to 128x128 (i.e., CTU size). If the quadtree leaf node is 128x128, the quadtree leaf node will not be further split by the binary tree because the size exceeds MaxBTSize (i.e., 64x64 in this example). Otherwise, the quadtree leaf node will be further divided by the binary tree. Therefore, the quadtree leaf node is also the root node of the binary tree, and the depth of the binary tree is 0. When the binary tree depth reaches MaxBTDepth (4 in this example), further splitting is not allowed. When the width of a binary tree node is equal to MinBTSize (4 in this example), this means that no further horizontal splitting is allowed. Similarly, a binary tree node with a height equal to MinBTSize means that no further vertical splitting is allowed for the binary tree node. As mentioned above, the leaf node of the binary tree is called a CU and is further processed according to prediction and transformation without further splitting.
[0082] Figure 3 is a block diagram illustrating one example of a video encoder 200 disclosed in the present disclosure. Figure 3The above description is provided for the purpose of explanation and should not be considered as limiting the techniques broadly exemplified and described in the present disclosure. For the purpose of explanation, the present disclosure describes the video encoder 200 in the context of video coding standards such as the HEVC video coding standard under development and the H.266 video coding standard. However, the techniques of the present disclosure are not limited to these video coding standards and are applicable to general video encoding and decoding.
[0083] like Figure 3 In the example shown, 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 processing circuits. For example, the units of the video encoder 200 can be one or more circuits or logic elements as part of a hardware circuit, or as part of a processor, an ASIC, or an FPGA. In addition, the video encoder 200 may include additional or alternative processors or processing circuits to perform these and other functions.
[0084] The video data memory 230 may store video data to be encoded by the components of the video encoder 200. The video encoder 200 may receive video data from, for example, the 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 by video encoder 200 in the prediction of subsequent video data. Video data memory 230 and DPB218 can be 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 DPB218 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.
[0085] In the present disclosure, unless specifically described as such, references to the video data memory 230 should not be interpreted as limited to memory internal to the video encoder 200, unless specifically described as such, or to memory external to the video encoder 200, unless specifically described as such. 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 of 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 .
[0086] Show Figure 3 The various units of the video encoder 200 are described to help understand the operations performed by the video encoder 200. These units can be implemented as fixed-function circuits, programmable circuits, or a combination thereof. A fixed-function circuit refers to a circuit that provides a specific function and presets the operations that can be performed. A programmable circuit refers to a circuit that can be programmed to perform various tasks and provide flexible functions 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., 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 units may be different circuit blocks (fixed function or programmable), and in some examples, one or more units may be integrated circuits.
[0087] 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 where 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 within another video encoder 200 (not shown) may store such instructions.
[0088] The video data memory 230 is configured to store received video data. The video encoder 200 may retrieve pictures of 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.
[0089] Mode selection unit 202 includes motion estimation unit 222, motion compensation unit 224, and intra prediction unit 226. Mode selection unit 202 may include additional functional units that perform video prediction according to other prediction modes. In some examples, mode selection unit 202 may include a palette unit, an intra-block copy unit (which may be part of motion estimation unit 222 and / or motion compensation unit 224), an affine unit, a linear model (LM) unit, etc.
[0090] The mode selection unit 202 usually coordinates multiple encoding channels to test the combination of encoding parameters and the rate-distortion value of the resulting combination. The encoding parameters may include the division of the CTU into CUs, the prediction mode of the CU, the transform type of the residual data of the CU, the quantization parameter of the residual data of the CU, etc. The mode selection unit 202 may ultimately select a combination of encoding parameters with a better rate-distortion value than other tested combinations.
[0091] 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 the QTBT structure described above or the quadtree structure of HEVC. 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".
[0092] 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 current block (e.g., the current CU, or the overlapping portion of the PU and TU in HEVC). For inter prediction of 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 are 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, indicating the reference block that most closely matches the current block.
[0093] The motion estimation unit 222 may form one or more motion vectors (MVs) that define the position of a reference block in a reference picture relative to the position of a current block in a 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 generate a prediction block using the motion vectors. 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.
[0094] As another example, for intra prediction or intra prediction encoding, 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 adjacent samples and pad these calculated values in a defined direction to span the current block to generate a prediction block. As another example, for DC mode, the intra prediction unit 226 may calculate an average value of samples adjacent to the current block and generate a prediction block to include the resulting average value for each sample of the prediction block.
[0095] 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 difference between the current block and the prediction block sample by sample. 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 code modulation (RDPCM). In some examples, the residual generation unit 204 may be formed using one or more subtractor circuits that perform binary subtraction.
[0096] In the 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 different sizes. As described above, the size of the CU may refer to the size of the luma coding block of the CU, and the size of the PU may refer to the size of the luma prediction unit of the PU. Assuming that the size of a particular CU is 2Nx2N, the video encoder 200 may support PUs of 2Nx2N or NxN for intra-prediction, and support PUs of 2Nx2N, 2NxN, Nx2N, NxN, etc. for inter-prediction. The video encoder 200 and the video decoder 300 may also support asymmetric partitioning of PU sizes of 2NxnU, 2NxnD, nLx2N, and nRx2N for inter-prediction.
[0097] In an example where the mode selection unit 202 does not further divide the 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. The video encoder 200 and the video decoder 300 may support a CU size of 2Nx2N, 2NxN, or Nx2N.
[0098] For other video coding techniques, such as intra-block copy mode coding, affine mode coding, and linear model (LM) mode coding as a few examples, the mode selection unit 202 generates a prediction block for the current block being encoded via various units 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 how to reconstruct the block 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.
[0099] 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.
[0100] The transform processing unit 206 applies one or more transforms to the residual block to generate a transform coefficient block (referred to herein as a "transform coefficient block"). The transform processing unit 206 can apply various transforms to the residual block to form the transform coefficient block. For example, the transform processing unit 206 can 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 can perform multiple transforms on the residual block, such as 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.
[0101] Quantization unit 208 may quantize transform coefficients in a transform coefficient block to produce a quantized transform coefficient block. 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. Video encoder 200 (e.g., via 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 introduce information loss, and therefore, the quantized transform coefficients may have lower precision than the original transform coefficients generated by transform processing unit 206.
[0102] The inverse quantization unit 210 and the inverse transform processing unit 212 may apply inverse quantization and inverse transform to the quantized transform coefficient block, respectively, to reconstruct a residual block from the transform coefficient block. The reconstruction unit 214 may generate a reconstructed block corresponding to the current block (although possibly 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.
[0103] The filter unit 216 may perform one or more filter operations on the reconstructed block. For example, the filter unit 216 may perform a deblocking operation to reduce blocky 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 be configured to perform various techniques related to ALF and CC-ALF of the present disclosure. For example, the filter unit 216 may determine that the chroma samples of the decoded chroma block are on the first side of the adaptive loop filter (ALF) virtual boundary and the co-located luminance samples of the decoded luminance block are on the second side of the ALF virtual boundary, wherein the co-located luminance samples are co-located with the chroma samples, and the first side is different from the second side. In response to the determination, the filter unit 216 may disable CC-ALF for the chroma samples. For example, in VVC, the location of the ALF virtual boundary is 4 luminance lines and 2 chroma lines above the horizontal CTU boundary.
[0104] Additionally or alternatively, filter unit 216 may determine that chroma samples of a decoded chroma block are on a first side of a CC-ALF virtual boundary and co-located luma samples of a decoded luma block are on a second side of the CC-ALF virtual boundary, wherein the co-located luma samples are co-located with the chroma samples. In response, filter unit 216 may perform CC-ALF filtering of the chroma samples using the replaced luma samples instead of the co-located luma samples, as discussed in more detail below, for example, with respect to Fig.12 –14.
[0105] 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 required, the reconstruction unit 214 can store the reconstructed blocks to the DPB 218. For example, in an example where the operation of the filter unit 216 is not required, the filter unit 216 can store the reconstructed blocks to the DPB 218. The motion estimation unit 222 and the motion compensation unit 224 can retrieve a reference picture from the DPB 218, which is formed from the reconstructed (and potentially filtered) blocks to perform inter-frame prediction on blocks of subsequently encoded pictures. In addition, the intra-frame prediction unit 226 can use the reconstructed blocks in the DPB 218 of the current picture to perform intra-frame prediction on other blocks in the current picture.
[0106] 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 elements of the video data as another example 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 in which the syntax elements are not entropy-encoded.
[0107] 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.
[0108] The above operations are described with respect to one block. This description should be understood as operations for a luma coding block and / or a chroma coding block. As described above, in some examples, the luma coding block and the chroma coding block are the luma and chroma components of a CU. In some examples, the luma coding block and the chroma coding block are the luma and chroma components of a PU.
[0109] 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 a motion vector (MV) and a reference picture for a luma coding block need not be repeated for identifying an MV and a reference picture for a chroma block. Instead, the MV of the luma coding block may be scaled to determine the MV of the chroma block, and the reference picture may be the same. As another example, the intra prediction process may be the same for luma coding blocks and chroma coding blocks.
[0110] As described above, the video encoder 200 is configured to perform cross-component adaptive loop filtering (e.g., such as using filter unit 216). Examples of cross-component adaptive loop filtering are described in more detail below, including possible problems and technical examples for overcoming these problems. For example, the video encoder 200 (e.g., via filter unit 216) represents an example of a video encoding device, which includes a memory configured to store video data, and one or more processing units implemented in a circuit, and is configured to determine that one or more luma samples for cross-component adaptive loop filtering of chroma samples are unavailable, and at least one of the following: (1) replace one or more unavailable luma samples with one or more available luma samples, and perform cross-component adaptive loop filtering on the chroma samples using the one or more available luma samples, (2) perform cross-component adaptive loop filtering on the chroma samples without replacing one or more unavailable luma samples, or (3) bypass cross-component adaptive loop filtering on the chroma samples.
[0111] In this manner, the video encoder 200 represents an example of an apparatus for decoding video data, the apparatus comprising a memory configured to store the video data; and one or more processors implemented in circuitry and configured to: decode a coding tree unit (CTU) of the video data, the CTU comprising a luma block and a chroma block to produce a decoded luma block and a decoded chroma block; determine that a chroma sample of the decoded chroma block is on a first side of an adaptive loop filter (ALF) virtual boundary, and a co-located luma sample of the decoded luma block is on a second side of the ALF virtual boundary, the co-located luma sample is co-located with the chroma sample, the first side being different from the second side; and in response to determining that the chroma sample is on the first side and the luma sample is on the second side (e.g., as Fig.10 As shown in FIG. 1 and discussed in more detail below), cross-component adaptive loop filtering (CC-ALF) is disabled for chroma samples. For example, in VVC, for 4:4:4 and 4:2:2 video sequences, CC-ALF is disabled for chroma samples in the third and fourth lines above the horizontal CTU boundary.
[0112] Figure 4is a block diagram illustrating one example of a video decoder 300 disclosed in the present disclosure. Figure 4 It is provided for the purpose of explanation and should not be considered as limiting the techniques widely exemplified and described in this disclosure. For ease of explanation, this disclosure describes a video decoder 300 according to JEM, VVC, and HEVC techniques. However, the techniques of this disclosure may be performed by a video decoding device configured for other video decoding standards.
[0113] In such Figure 4 In the example shown, 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 may be implemented in one or more processors or in processing circuits. For example, the units of the video decoder 300 may be one or more circuits or logic elements as part of a hardware circuit, or as part of a processor, FPGA, ASIC. In addition, the video decoder 300 may include additional or alternative processors or processing circuits to perform these and other functions.
[0114] 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 prediction 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.
[0115] The CPB memory 320 may store video data, such as an encoded video bitstream, to be decoded by components of the video decoder 300. The video data stored in the CPB memory 320 may be, for example, received from the computer-readable medium 110 ( Figure 1) is obtained. The CPB memory 320 may include a CPB that stores encoded video data (e.g., syntax elements) from an encoded video bitstream. In addition, the CPB memory 320 may store video data other than syntax elements of a decoded picture, such as temporary data representing the output from various units of the video decoder 300. The DPB314 typically stores decoded pictures, which the video decoder 300 can output and / or use as reference video data when decoding subsequent data or pictures of the encoded video bitstream. The CPB memory 320 and the DPB314 may be formed by any of a variety of memory devices, such as DRAM, including SDRAM, MRAM, RRAM, or other types of memory devices. The CPB memory 320 and the DPB314 may be the same memory device or a separate memory device. In various examples, the CPB memory 320 may be on-chip with other components of the video decoder 300, or off-chip relative to those components.
[0116] 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, memory 120 may store instructions to be executed by video decoder 300 when some or all of the functions of video decoder 300 are performed by software by processing circuitry of video decoder 300.
[0117] illustrate Figure 4 The various units are shown to aid in understanding the operations performed by the video decoder 300. These units may be implemented as fixed-function circuits, programmable circuits, or a combination thereof. Figure 3 , fixed-function circuits refer to circuits that provide specific functions and have preset operations that can be performed. Programmable circuits refer to circuits that can be programmed to perform various tasks and provide flexible functions 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 (for example, 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 units may be integrated circuits.
[0118] 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 video decoder 300 is operated by software on a programmable circuit, an on-chip or off-chip memory may store software instructions (e.g., object code) received and executed by the video decoder 300.
[0119] 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.
[0120] Generally speaking, the video decoder 300 reconstructs a picture on a block-by-block basis. The video decoder 300 may perform a reconstruction operation on each block individually (where the block currently being reconstructed (ie, decoded) may be referred to as a "current block").
[0121] 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, determine a degree of inverse quantization to be applied by the inverse quantization unit 306. For example, the inverse quantization unit 306 may 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.
[0122] 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 other inverse transforms to the transform coefficient block.
[0123] In addition, prediction processing unit 304 generates a prediction block based on the prediction information syntax element entropy decoded by entropy decoding unit 302. For example, if the prediction information syntax element indicates that the current block is inter-predicted, motion compensation unit 316 can generate the prediction block. In this case, the prediction information syntax element 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 current block in the current picture. Motion compensation unit 316 can generally generate a prediction block in a manner substantially similar to that described with respect to motion compensation unit 224 ( Figure 3 ) to perform the inter-frame prediction process in the manner described.
[0124] As another example, if the prediction information syntax element indicates that the current block is intra-predicted, the intra-prediction unit 318 can generate a prediction block according to the intra-prediction mode indicated by the prediction information syntax element. Again, the intra-prediction unit 318 can generally generate a prediction block in a manner substantially similar to that described with respect to the intra-prediction unit 226 ( Figure 3 ) to perform the intra prediction process. The intra prediction unit 318 can retrieve data of neighboring samples of the current block from the DPB 314.
[0125] 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.
[0126] The filter unit 312 may perform one or more filter operations on the reconstructed block. For example, the filter unit 312 may perform a deblocking operation to reduce blocky artifacts along the edge of the CU. The operation of the filter unit 312 is not necessarily performed in all examples. The filter unit 312 may be configured to perform various techniques related to ALF and CC-ALF of the present disclosure. For example, the filter unit 312 may determine that the chroma samples of the decoded chroma block are on the first side of the adaptive loop filter (ALF) virtual boundary and the co-located luminance samples of the decoded luminance block are on the second side of the ALF virtual boundary, where the co-located luminance samples are co-located with the chroma samples, and the first side is different from the second side. In response to this determination, the filter unit 312 may disable CC-ALF for the chroma samples.
[0127] Additionally or alternatively, filter unit 312 may determine that chroma samples of a decoded chroma block are on a first side of a CC-ALF virtual boundary and co-located luma samples of a decoded luma block are on a second side of a CC-ALF virtual boundary, wherein the co-located luma samples are co-located with the chroma samples. In response, filter unit 312 may perform CC-ALF filtering of the chroma samples using the replaced luma samples instead of the co-located luma samples, as described below, for example, with respect to Figure 12-14 discussed in more detail.
[0128] The video decoder 300 may store the reconstructed block in the DPB 314. For example, in an example where the operation of the filter unit 312 is not performed, the reconstruction unit 310 may store the reconstructed block to the DPB 314. In an example where the operation of the filter unit 312 is performed, the filter unit 312 may store the filtered reconstructed block to the DPB 314. As described above, the DPB 314 may provide reference information to the prediction processing unit 304, such as samples of the current picture for intra-frame prediction and samples of previously decoded pictures for subsequent motion compensation. In addition, the video decoder 300 may output a decoded picture (e.g., a decoded video) from the DPB 314 for subsequent presentation on a display device (e.g., Figure 1 on a display device 118).
[0129] As described above, the video decoder 300 can be configured to perform cross-component adaptive loop filtering (e.g., such as using filter unit 312). Examples of cross-component adaptive loop filtering are described in more detail below, including possible problems and examples of techniques for overcoming these problems. For example, the video decoder 300 (e.g., via filter unit 312) represents an example of a video decoding device that includes a memory configured to store video data, and one or more processing units that are implemented in circuits and configured to determine that one or more luma samples for cross-component adaptive loop filtering of chroma samples are unavailable, and at least one of the following: (1) replace one or more unavailable luma samples with one or more available luma samples and perform cross-component adaptive loop filtering on the chroma samples using the one or more available luma samples, (2) perform cross-component adaptive loop filtering on the chroma samples without replacing one or more unavailable luma samples, or (3) bypass cross-component adaptive loop filtering on the chroma samples.
[0130] In Misra et al., "Cross-Component Adaptive Loop Filter for chroma", ITU-TSG 16WP 3 and ISO / IED JTC1 / SC 29 / WG 11 Joint Video Experts Group (JEVT) 15th Meeting: Gothenburg, Sweden, July 3-12, 2019, JVET-O0636 (hereinafter referred to as "JVET-O0636"), a tool called Cross-Component Adaptive Loop Filter (CC-ALF) is proposed. CC-ALF operates as part of the adaptive loop filter (ALF) and utilizes luma samples to improve each chroma component. The tool is controlled by information in the bitstream, which includes filter coefficients for each chroma component (signaled in the Adaptive Parameter Set (APS)) and a mask that controls the application of the filter to blocks of samples.
[0131] In this manner, the video decoder 300 represents an example of a device for decoding video data, the device comprising a memory configured to store the video data; and one or more processors implemented in a circuit and configured to: decode a coding tree unit (CTU) of the video data, the CTU comprising a luma block and a chroma block to produce a decoded luma block and a decoded chroma block; determine that the chroma samples of the decoded chroma block are on a first side of an adaptive loop filter (ALF) virtual boundary, and the co-located luma samples of the decoded luma block are on a second side of the ALF virtual boundary, the co-located luma samples are co-located with the chroma samples, the first side being different from the second side; and in response to determining that the chroma samples are on the first side and the luma samples are on the second side, disable cross-component adaptive loop filtering (CC-ALF) for the chroma samples.
[0132] Figure 5 is a block diagram illustrating a cross-component adaptive loop filter (CC-ALF) reconstruction stage. Figure 5 A filter unit 400 is depicted, which represents Figure 3 The filter unit 216 or Figure 4 An example of a filter unit 312. Figure 5 As shown, the ALF luma unit 404 receives SAO-filtered luma samples (Y) from the SAO (sample adaptive offset) luma unit 402, and the ALF luma unit 404 performs adaptive loop filtering on the luma samples. The ALF chroma unit 412 receives SAO-filtered blue hue chroma samples (CB) from the SAO CB unit 408, and receives SAO-filtered red hue chroma samples (CR) from the SAO CR unit 410, and the ALF chroma unit 412 performs adaptive loop filtering on the chroma samples.
[0133] The CC-ALF CB unit 406 and the CC-ALF CR unit 407 each perform an operation on the luma sample to generate an improved value added to the corresponding output of the ALF chroma unit 412. In this way, the luma sample is used as part of the adaptive loop filtering of the chroma sample (e.g., by improving the result of the adaptive loop filtering). Therefore, when the filter unit 400 performs CC-ALF, the filter unit 400 outputs the CC-ALF filtered luma sample (Y'), the blue hue chroma sample (CB'), and the red hue chroma sample (CR'). However, as described in more detail, this cross-component adaptive loop filtering may have problems, and the CC-ALF CB unit 406 and the CC-ALF CR unit 407 can be configured to perform the techniques of the present disclosure to solve these problems. For example, if the luma sample is on one side of the ALF virtual boundary and the co-located chroma sample is on the other side of the ALF virtual boundary, the filter unit 400 can disable CC-ALF for the chroma sample.
[0134] It should be understood that the CC-ALF CB unit 406 and CC-ALF CR unit 407 performing the example techniques are described only as an example and should not be considered limiting. Various components of the filter unit 400 or some combinations of the filter unit 400 with components of the video encoder 200 and the video decoder 300 can be configured to perform the example techniques described in the present disclosure.
[0135] In addition, ALF luma unit 404 and ALF chroma unit 412 are shown as receiving luma and chroma samples filtered using SAO luma unit 402, SAO CB unit 408, and SAO CR unit 410, respectively. However, in some examples, sample adaptive offset filtering may not be present. In addition, although deblocking filtering is not shown, in some examples, luma and chroma samples may be deblocked filtered before SAO or ALF or after SAO or ALF.
[0136] Figure 5 The improvement of the chroma samples is illustrated to occur after the ALF chroma unit 412. However, in some examples, the improvement may be performed prior to the operation of the ALF chroma unit 412 (ie, the ALF chroma unit 412 receives the adaptive loop filtered improved chroma samples).
[0137] In JVET-O0636, each filter coefficient is represented as a fixed-point fraction. For example, the filter coefficient uses the lower 10 bits to represent the fractional part. Each coefficient is signaled using Exponential Golomb (EG) decoding, whose order depends on the coefficient position in the filter template.
[0138] A variety of filter shapes can be used for CC-ALF. For example, in Misra et al., “CE5-related: On the design of CC-ALF,” ITU-TSG 16WP 3 and ISO / IEC JTC 1 / SC 29 / WG 11 Joint Video Experts Group (JVET) 16th Meeting: Geneva, Switzerland, October 1-11, 2019, JVET-P1008 (hereinafter referred to as “JVET-P1008”), Figure 6 As shown, a 4x3 filter is used for CC-ALF. In Hu et al., “CE5-related: Reduced filtershape for cross component adaptive loop filter,” ITU-T SG 16WP 3 and ISO / IEC JTC1 / SC 29 / WG 11 Joint Video Experts Group (JVET) 16th Meeting: Geneva, Switzerland, October 1-11, 2019, JVET-P0558 (hereinafter referred to as “JVET-P0558”) and U.S. Provisional Application No. 62 / 897,627 filed on September 9, 2019, as Figure 7 As shown, a 5x5 filter is used for CC-ALF.
[0139] When CC-ALF is applied to chroma samples, luma samples surrounding the co-located luma samples (e.g., neighboring samples selected according to a CC-ALF defined pattern around the co-located luma samples) may be used in a manner such that the co-located luma samples may be located at the center of the pattern. Figure 6 In the filter shape (pattern) shown in FIG. 1 , co-located luminance samples are mapped to position f2 in the filter. Figure 7 In the filter shape shown, the co-located luma sample is mapped to position f6 in the filter.
[0140] When designing a decoder (e.g., video decoder 300) for a video coding standard, when reconstructing a coding tree unit (CTU), some bottom lines of luma samples and some bottom lines of chroma samples in a top CTU are saved in a line buffer due to the delay of a deblocking filter and SAO, which requires samples from a current CTU.
[0141] For example, in the design of a VVC decoder such as video decoder 300, when reconstructing a CTU, 4 lines of luma samples and 2 lines of chroma samples in the bottom CTU are reserved as line buffers. To reduce line buffer requirements, samples in an ALF unit may not (e.g., cannot) access samples in the ALF unit above or below it when performing ALF. Therefore, one ALF processing unit (bounded by the ALF virtual boundary) moves up 4 lines of luma samples and 2 lines of chroma samples.
[0142] For example, Figure 8 is a conceptual diagram illustrating an example of an ALF processing unit, in which 4 lines of luma samples and 2 lines of chroma samples are arranged above a CTU boundary. Figure 8 As shown, the dashed line represents the line buffer / ALF unit boundary and the solid line represents the CTU boundary. As shown in the figure, 4 lines of luma samples and 2 rows of chroma samples are located above the CTU boundary.
[0143] Similarly, in the design of a decoder for a video coding standard (e.g., video decoder 300), when reconstructing a CTU, some right columns of luma and chroma samples from the left neighboring CTU are kept as a column buffer. To reduce the column buffer memory requirements of the ALF, a sample in one ALF unit may not (e.g., cannot) reference any sample in another ALF unit.
[0144] For example, when reconstructing a CTU, the bottom 4 lines of luma samples and 2 lines of chroma samples in the top CTU can be reserved as a line buffer. The right 4 columns of luma samples and 2 columns of chroma samples in the left CTU are reserved as a column buffer. Therefore, the ALF processing unit moves 4 lines of luma samples and 2 lines of chroma samples upward, and 4 columns of luma samples and 2 columns of chroma samples to the left.
[0145] For example, Fig. 9 is a conceptual diagram illustrating an example of an ALF processing unit, in which 4 lines of luma samples and 2 lines of chroma samples are arranged above the CTU boundary, and 4 columns of luma samples and 2 lines of chroma samples are arranged to the left of the CTU boundary. Fig. 9 As shown, the dotted line represents the line buffer / ALF unit boundary, and the solid line represents the CTU boundary. As shown in the figure, 4 lines of luma samples and 2 lines of chroma samples are located above the CTU boundary, and 4 columns of luma samples and 2 lines of chroma samples are located on the left side of the CTU boundary.
[0146] For some chroma sample formats such as 4:2:2 and 4:4:4, if reconstruction is applied only to each CTU line, or if ALF / CC-ALF units are being interleaved, the luma and chroma ALF units of the same CTU may not be aligned. A chroma sample and its co-located luma sample may be in different ALF units.
[0147] Fig.10 and 11 is a conceptual diagram illustrating the undefined CC-ALF behavior when the current chroma sample and its co-located luma sample are in different ALF units. That is, conventional techniques do not address the problem of how to filter these samples in this case. Fig.10 and 11 In the example, when CC-ALF is applied to chroma sample A, its co-located luma sample A' is located in a different ALF unit. For example, A and A' are located on different sides of the ALF line buffer boundary. In this case, the behavior of CC-ALF may be undefined in the conventional technique, because to run CC-ALF for A, some luma samples around A' and A' itself are waiting for deblocking filter and SAO processing of lower CTUs. Therefore, these luma samples are not available.
[0148] In some examples, the ALF line buffer positions (virtual boundary positions, ALF unit boundary positions) in VVC draft 8 are 4 lines of luma samples and 2 lines of chroma samples above the CTU boundary. In some examples, the ALF line buffer positions may indicate which samples may be used for CC-ALF. As described in more detail below, in some examples, the ALF line buffer may not be fixed and may be adaptive.
[0149] In order to solve one or more problems described in this disclosure, this disclosure describes various example techniques. The example techniques should not be interpreted as limited to solving the problems and can be generally used as part of video decoding. In addition, the example techniques can be used together or separately.
[0150] In one or more examples, when co-located luma samples or neighboring luma samples are located in different ALF units than the chroma samples to be filtered (e.g., on a different side of an ALF line buffer boundary), then such luma samples may be considered unavailable and may be replaced by available samples or excluded from the CC-ALF filtering process.
[0151] As an example, CC-ALF can be disabled when a chroma sample and its co-located luma sample are on different sides of the ALF line buffer boundary. In VVC draft 8, the CC-ALF equations are modified as shown below, with additions shown in bold and italic text between / + to + / .
[0152] -The derivation of the variable sum is as follows:
[0153]
[0154]
[0155] sum = curr + scaledSum (1534)
[0156] The modified filtered reconstructed chrominance picture sample CC-ALFPicture[xCtbC+x][yCtbC+y] is derived as follows:
[0157] CC-ALFPicture[xCtbC+x][yCtbC+y]=Clip3(0,(1< <BitDepth)-1,sum) (1535)
[0158] In the cases used above and below, CtbSizeY represents the size of the luma coding tree block (CTB) in width and height. SubHeightC and SubWidthC represent the height or width ratio between the luma block and the chroma block, respectively. For example, for the 4:2:0 color format, SubHeightC and SubWidthC are both equal to 2 because the height and width of the luma block are twice the height and width of the luma block. For the 4:2:2 color format, SubHeightC is equal to 1 and SubWidthC is equal to 2 because the chroma block and the luma block have the same height, but the width of the luma block is twice the width of the chroma block.
[0159] As an example, when a chroma sample and its co-located luma sample are on different sides of the ALF line buffer boundary, the unavailable luma samples may be padded with the nearest luma sample in the same ALF line buffer side (same ALF unit) as the chroma sample, e.g. Fig.12 For example, Fig.12 is a conceptual diagram illustrating an example of filling unavailable luma pixels with available luma samples using repeated filling.
[0160] As an example, when a chroma sample and its co-located luma sample are on different sides of the ALF line buffer boundary, the mirrored luma sample in the same ALF line buffer side (same ALF unit) as the chroma sample may be padded to the unavailable luma sample. Fig.13 For example, Fig.13 is a conceptual diagram showing an example of mirror filling.
[0161] As an example, when a chroma sample and its collocated luma sample are on different sides of the ALF line buffer boundary, the nearest luma sample on the same ALF line buffer side (same ALF unit) as the chroma sample can be used as the new collocated luma sample, as Fig.14 shown. For example, Fig.14 is a conceptual diagram illustrating an example where the nearest luma sample in the same ALF line buffer is used as the new collocated luma sample. In section 8.8.5.7 of the VVC draft 8, yL determines the vertical position of the luma sample of the current chroma sample. In some examples, yL may be clipped as follows: If y < CtbSizeY / SubHeightC – 2 and y * SubHeightC >= CtbSizeY – 4, yL is set to be equal to yCtbC * SubHeightC + CtbSizeY - 5. The coordinates (xCtbC, yCtbC) define the position of the chroma transform block (CTB).
[0162] As an example, when a chroma sample and its collocated luma sample are on different sides of the ALF line buffer boundary, the mirrored luma sample in the same ALF line buffer side (same ALF unit) as the chroma sample can be used as the new collocated luma sample, as Fig.15 shown. For example, Fig.15 is a conceptual diagram illustrating an example where the mirrored luma sample in the same ALF line side is used as the new collocated luma sample. In section 8.8.5.7 of the VVC draft 8, yL determines the vertical position of the luma sample of the current chroma sample. In some examples, yL may be clipped as follows: If y < CtbSizeY / SubHeightC – 2 and y * SubHeightC is equal to CtbSizeY – 4, yL is set to be equal to yCtbC * SubHeightC + CtbSizeY - 5; otherwise if y < CtbSizeY / SubHeightC – 2 and y * SubHeightC is equal to CtbSizeY – 3, yL is set to be equal to yCtbC * SubHeightC + CtbSizeY - 6.
[0163] As an example, when a chroma sample and its collocated luma sample are on different sides of the ALF line buffer boundary (also referred to as the ALF virtual boundary), the nearest luma sample in the same ALF line buffer side (same ALF unit) as the chroma sample can be used as the new collocated luma sample such that all luma pixels in the filter shape are on the same ALF line buffer side (same ALF unit) as the chroma sample, as Fig.16 shown. For example, Fig.16It is a conceptual diagram illustrating the concept that the closest luminance sample in the same ALF line buffer is used as the new co-located luminance sample, such that all luminance samples in the filter shape are on the same ALF line buffer side (the same ALF unit) as the chrominance samples. In section 8.8.5.7 of VVC draft 8, yL determines the vertical position of the luminance sample corresponding to the current chrominance sample. In some examples, yL may be clipped as follows: If y < CtbSizeY / SubHeightC–2 and y*SubHeightC >= CtbSizeY–4, yL is set to be equal to yCtbC*SubHeightC + CtbSizeY - 7.
[0164] As an example, when the chrominance and its co-located luminance samples are on different sides of the ALF line buffer boundary, some predefined / fixed values can be used to fill the unavailable luminance samples. The predefined / fixed values can be fixed for all video sequences, or can be signaled at the sequence / group of pictures / APS / slice / tile / tile group / brick / block level.
[0165] As an example, different numbers of chrominance line buffers can be used for different chrominance subsampling formats. For example, for 4:2:2 and 4:4:4 formats, 4 lines of chrominance samples above the CTU can be stored. For other chrominance subsampling formats, 2 lines of chrominance samples above the CTU can be stored.
[0166] In some examples, the line buffer boundary (virtual boundary) position of the chrominance ALF can be adapted to the chrominance format. For example, for 4:2:2 and 4:4:4 formats, the virtual boundary position of the chrominance ALF is 4 lines of chrominance samples above the CTU. For other chrominance subsampling formats, the virtual boundary position of the chrominance ALF is 2 lines of chrominance samples above the CTU.
[0167] In VVC draft 8, the chrominance ALF may be changed as follows, where the added content is shown as the bold and italic text between / + and + / .
[0168] - The variable sum is derived as follows:
[0169]
[0170] sum = curr + ((sum + 64) >> alfShiftC) (1508)
[0171] - / + The alf line buffer position offset is set to: alfLineBufOffset = SubHeightC == 1? -2 : 0 + /
[0172] - The modified filtered reconstructed chrominance picture sample alfPicture[xCtbC+x][yCtbC+y] is derived as follows:
[0173] alfPicture[xCtbC+x][yCtbC+y]=Clip3(0,(1< <BitDepth)-1,sum) (1509)
[0174] Table 46 – Specifying y1, y2, and alfShiftC according to vertical chroma sample position y and applyAlfLineBufBoundary
[0175]
[0176] As an example, when some luma samples are not available (e.g., located in a different ALF unit than the ALF unit of the chroma samples to be filtered), sample values before the deblocking filter can be used. In another example, all samples in the filter shape can use samples before the deblocking filter.
[0177] In some examples, when certain luma samples are not available (e.g., located in a different ALF unit than the ALF unit of the chroma samples to be filtered), a different CC-ALF shape may be used for filtering that operates only on the available luma samples. Examples of new CC-ALF shapes may be different from conventional CC-ALF shapes (i.e., have a different number of coefficients). In one or more such examples, the filter coefficients required for the new CC-ALF shape may be derived differently (i.e., for a different number of coefficients), or coefficients used for the conventional CC-ALF shape may be repurposed by merging some of the coefficients, such as with a center coefficient.
[0178] When column buffers are used, co-located luma samples of chroma samples may also be in different ALF units. Video encoder 200 and video decoder 300 may perform the example techniques described above, but with respect to column buffers. In some examples using both line buffers and column buffers, video encoder 200 and video decoder 300 may perform the example techniques described above, but with respect to line buffers or column buffers (including both line and column buffers).
[0179] Fig.17 2 is a flowchart illustrating an example method for encoding a current block. The current block may include a current CU. Although described with respect to video encoder 200 ( Figure 1 and 3 ), it should be understood that other devices may be configured to perform similar Fig.17 method of method of method.
[0180] In this example, the video encoder 200 first predicts the current block (350). For example, the video encoder 200 may form a prediction block for the current block. The video encoder 200 may then calculate a residual block for the current block (352). In order 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 and quantize the 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 encode the transform coefficients using CAVLC or CABAC. The video encoder 200 may then output the entropy encoded data of the block (360).
[0181] In addition, video encoder 200 may also decode the current block (362). For example, video encoder 200 may use inverse quantization unit 210 and inverse transform processing unit 212 ( Figure 3 ) to inversely quantize and inversely transform the quantized transform coefficients to reproduce the residual block. The reconstruction unit 214 may combine the prediction block with the reproduced residual block.
[0182] Using the techniques of the present disclosure, video encoder 200 may determine whether to perform CC-ALF filtering of samples of a decoded chroma block using samples of a corresponding decoded luma block (364). For example, for a current chroma sample of a current block located on a first side of an ALF virtual boundary, filter unit 216 may determine that a co-located luma sample of the corresponding luma block is on a second (different) side of the ALF virtual boundary. In this case, in one example, filter unit 216 may determine not to perform CC-ALF filtering of the current chroma sample. Alternatively, in a different example, filter unit 216 may determine to perform CC-ALF filtering, but using a luma sample that is an alternative to the co-located luma sample, e.g., as described above (using padding, mirroring, etc.).
[0183] In response to determining to perform CC-ALF filtering on the decoded samples (the "yes" branch of 364), filter unit 216 may perform CC-ALF filtering on the decoded samples (366). However, in response to determining not to perform CC-ALF filtering on the decoded samples (the "no" branch of 364), filter unit 216 may disable CC-ALF filtering for the current chroma sample. In either case, video encoder 200 may store the (possibly CC-ALF filtered) samples in DPB 218 (368), for example, for use as a reference for subsequent prediction.
[0184] In this way, Fig.17The method represents an example of a method for decoding video data, the method comprising decoding a coding tree unit (CTU) of the video data, the CTU comprising a luma block and a chroma block to generate a decoded luma block and a decoded chroma block; determining that a chroma sample of the decoded chroma block is on a first side of an adaptive loop filter (ALF) virtual boundary, and a co-located luma sample of the decoded luma block is on a second side of the ALF virtual boundary, the co-located luma sample is co-located with the chroma sample, the first side being different from the second side; and in response to determining that the chroma sample is on the first side and the luma sample is on the second side, disabling cross-component adaptive loop filtering (CC-ALF) of the chroma sample.
[0185] Fig.18 1 is a flowchart illustrating an example method for encoding a current block of video data. The current block may include a current CU. Although described with respect to video decoder 300 ( Figure 1 and 4 ), it should be understood that other devices may be configured to perform similar Fig.18 method.
[0186] The video decoder 300 may receive entropy coded data for a current block, such as entropy coded prediction information and entropy coded data corresponding to residual block coefficients of 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 coefficients of the residual block (372). The video decoder 300 may predict the current block (374), for example, using an intra-frame or inter-frame prediction mode indicated by the prediction information of the current block to calculate a prediction block for the current block. The video decoder 300 may then reverse scan the reproduced coefficients (376) to create a block of quantized transform coefficients. The video decoder 300 may then inverse quantize and inverse transform the transform coefficients to produce a residual block (378). The video decoder 300 may ultimately decode the current block (380) by combining the prediction block and the residual block.
[0187] Using the techniques of the present disclosure, video decoder 300 may determine whether to perform CC-ALF filtering on samples of a decoded chroma block (382). For example, for a current chroma sample of a current block that is located on a first side of an ALF virtual boundary, filter unit 312 may determine that a co-located luma sample of a corresponding luma block is on a second (different) side of the ALF virtual boundary. In this case, in one example, filter unit 312 may determine not to perform CC-ALF filtering on the current chroma sample. Alternatively, in a different example, filter unit 312 may determine to perform CC-ALF filtering, but to perform it using a replacement luma sample for the co-located luma sample, for example, as described above (using padding, mirroring, etc.).
[0188] In response to determining to perform CC-ALF filtering on the decoded samples (the "yes" branch of 382), filter unit 312 may perform CC-ALF filtering on the decoded samples (384). However, in response to determining not to perform CC-ALF filtering on the decoded samples (the "no" branch of 382), filter unit 312 may disable CC-ALF filtering for the current chroma sample. In either case, video decoder 300 may store the (possibly CC-ALF filtered) samples in DPB 218 (386), e.g., for use as a reference for subsequent prediction.
[0189] In this way, Fig.18 The method represents an example of a method for decoding video data, the method comprising decoding a coding tree unit (CTU) of the video data, the CTU comprising a luma block and a chroma block to generate a decoded luma block and a decoded chroma block; determining that a chroma sample of the decoded chroma block is on a first side of an adaptive loop filter (ALF) virtual boundary, and a co-located luma sample of the decoded luma block is on a second side of the ALF virtual boundary, the co-located luma sample is co-located with the chroma sample, the first side being different from the second side; and in response to determining that the chroma sample is on the first side and the luma sample is on the second side, disabling cross-component adaptive loop filtering (CC-ALF) for the chroma sample.
[0190] Fig.19 is a flow chart illustrating an example method for decoding and filtering video data according to the techniques of the present disclosure. For purposes of example and explanation, Fig.19 Method reference Figure 4 However, it should be understood that the video encoder 200 and other encoding and / or decoding devices may perform this or similar methods.
[0191] Initially, the video decoder 300 decodes a luma block of a coding tree unit (CTU) (420). The video decoder 300 also decodes a chroma block of a CTU (422). The chroma block may be a blue tone (CB) block or a red tone (CR) block. In various examples, the CTU may conform to one of a 4:4:4 format or a 4:2:2 format. Thus, the video decoder 300 may store luma samples of the luma block in a different line buffer than chroma samples of the chroma block, and the video decoder 300 may clear the line buffer including the luma samples before filtering the chroma block.
[0192] The video decoder 300 may also determine an ALF virtual boundary in the chroma block and the luma block (424). Due to the CTU format (e.g., 4:4:4 or 4:2:2), the video decoder 300 may determine that the chroma samples of the chroma block are on a first side of the ALF virtual boundary (426) and the co-located luma samples of the luma block are on a second (different) side of the ALF virtual boundary (428). In response to these determinations (i.e., the chroma samples and the co-located luma samples are on opposite sides of the ALF virtual boundary), the video decoder 300 may disable CC-ALF for the chroma samples (430). The video decoder 300 may still perform other types of filtering, such as standard ALF, SAO, etc.
[0193] In this way, Fig.19 The method represents an example of a method for decoding video data, the method comprising decoding a coding tree unit (CTU) of the video data, the CTU comprising a luma block and a chroma block to generate a decoded luma block and a decoded chroma block; determining that a chroma sample of the decoded chroma block is on a first side of an adaptive loop filter (ALF) virtual boundary, and a co-located luma sample of the decoded luma block is on a second side of the ALF virtual boundary, the co-located luma sample is co-located with the chroma sample, the first side being different from the second side; and in response to determining that the chroma sample is on the first side and the luma sample is on the second side, disabling cross-component adaptive loop filtering (CC-ALF) for the chroma sample.
[0194] The various techniques of this disclosure are summarized in the following clauses:
[0195] Item 1: A method for filtering video data, the method comprising: determining that one or more luma samples of a current block for cross-component adaptive loop filtering of chroma samples of the current block are unavailable; and at least one of the following: replacing one or more unavailable luma samples with one or more available luma samples, and performing cross-component adaptive loop filtering on the chroma samples with the one or more available luma samples; performing cross-component adaptive loop filtering on the chroma samples without replacing the one or more unavailable luma samples; or bypassing cross-component adaptive loop filtering on the chroma samples.
[0196] Clause 2: The method of clause 1, wherein determining that one or more luma samples for cross-component adaptive loop filtering of chroma samples are unavailable comprises: determining an adaptive loop filter (ALF) unit boundary; determining that one or more luma samples for cross-component adaptive loop filtering are on a first side of the ALF unit boundary; and determining that chroma samples are on a second side of the ALF unit boundary.
[0197] Clause 3: The method of any one of clauses 1 and 2, wherein determining that one or more luma samples for cross-component adaptive loop filtering of chroma samples are unavailable includes determining that a line or column buffer for storing one or more luma samples for cross-component adaptive loop filtering of chroma samples does not store the one or more luma samples.
[0198] Clause 4: The method of any of clauses 1-3, wherein replacing one or more unavailable luma samples with one or more available luma samples comprises replacing the unavailable luma samples with luma samples that are closest to the unavailable luma samples and stored in a row or column buffer for cross-component adaptive loop filtering.
[0199] Clause 5: The method of any of clauses 1-3, wherein replacing one or more unavailable luma samples with one or more available luma samples comprises replacing one or more unavailable luma samples with one or more mirrored luma samples stored in a row or column buffer for cross-component adaptive loop filtering.
[0200] Clause 6: The method of any of clauses 1-3, wherein replacing one or more unavailable luma samples with one or more available luma samples comprises replacing unavailable luma samples co-located with chroma samples with luma samples that are closest to the co-located unavailable luma samples and stored in a row or column buffer for cross-component adaptive loop filtering.
[0201] Clause 7: The method of any of clauses 1-3, wherein replacing one or more unavailable luma samples with one or more available luma samples comprises replacing unavailable luma samples co-located with chroma samples with mirrored luma samples stored in a row or column buffer for cross-component adaptive loop filtering.
[0202] Clause 8: A method of any of clauses 1-3, wherein replacing one or more unavailable luma samples with one or more available luma samples comprises replacing one or more luma samples of the unavailable luma samples with the closest luma samples in the same adaptive loop filter (ALF) unit as chroma samples, such that all luma samples used for cross-component adaptive loop filtering of the chroma samples are in the same ALF unit as the chroma samples.
[0203] Clause 9: The method of any of clauses 1-3, wherein replacing the one or more unavailable luma samples comprises replacing the one or more unavailable luma samples with a predefined or fixed value.
[0204] Clause 10: The method of any of clauses 1-9, wherein the one or more available luma samples include one or more luma samples before a deblocking filter is applied to the luma samples.
[0205] Clause 11: A method according to any one of Clauses 1-10, wherein performing cross-component adaptive loop filtering on a chrominance sample without replacing one or more unavailable luma samples includes performing cross-component adaptive loop filtering using a first filter shape that is different from a second filter shape used when all luma samples are available.
[0206] Clause 12: A method according to any one of Clauses 1-11, wherein replacing one or more unavailable luma samples with one or more available luma samples and performing cross-component adaptive loop filtering on a chrominance sample using one or more available luma samples includes: replacing one or more unavailable luma samples with one or more available luma samples having a vertical position defined by yL, the vertical position being clipped according to one or more of the following:
[0207] If y < CtbSizeY / SubHeightC – 2 and y*SubHeightC >= CtbSizeY – 4, then yL is set equal to yCtbC*SubHeightC + CtbSizeY - 5;
[0208] If y < CtbSizeY / SubHeightC – 2 and y*SubHeightC is equal to CtbSizeY – 4, then yL is set equal to yCtbC*SubHeightC + CtbSizeY - 5; otherwise if y < CtbSizeY / SubHeightC – 2 and y*SubHeightC is equal to CtbSizeY – 3, then yL is set equal to yCtbC*SubHeightC + CtbSizeY - 6;
[0209] If y < CtbSizeY / SubHeightC – 2 and y*SubHeightC >= CtbSizeY – 4, then yL is set equal to yCtbC*SubHeightC + CtbSizeY - 7,
[0210] wherein CtbSizeY represents the size of a luma coding tree block (CTB) in both width and height, SubHeightC indicates the ratio of height or width between luma and chroma blocks, and yCtbC is the y-coordinate of a chroma coding tree block.
[0211] Clause 13: A method according to any one of Clauses 1-12, wherein the method of filtering video data is performed by a video encoder as part of storing the video data in a memory.
[0212] Clause 14: The method of any of clauses 1-12, wherein the method of filtering video data is performed by a video decoder as part of storing the video data in memory and / or generating video data for display.
[0213] Clause 15: Any combination of Clauses 1 to 14.
[0214] Clause 16: An apparatus for filtering video data, the apparatus comprising: a memory configured to store luma samples and chroma samples for cross-component adaptive loop filtering; and a processing circuit coupled to the memory and configured to perform the method of any of clauses 1-15.
[0215] Clause 17: The device of clause 16, wherein the device comprises one or more of a display, a camera, a computer, a mobile device, a broadcast receiver device, or a set-top box configured to display the decoded video data.
[0216] Clause 18: The apparatus of any of clauses 16 and 17, wherein the apparatus is one of a video encoder or a video decoder.
[0217] Clause 19: A computer-readable storage medium having stored thereon instructions that, when executed, cause one or more processors to perform the method of any of clauses 1-15.
[0218] Clause 20: An apparatus for filtering video data, the apparatus comprising means for performing the method of any of clauses 1-15.
[0219] It should be appreciated that, according to examples, certain actions or events of any of the techniques 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 required to practice these techniques). In addition, in some examples, actions or events may be performed simultaneously, such as through multithreading, interrupt handling, or multiple processors, rather than sequentially.
[0220] In one or more examples, the functions described may be implemented in hardware, software, firmware, or any combination thereof. If implemented in software, the functions may be stored or transmitted as one or more instructions or codes on a computer-readable medium and executed by a hardware-based processing unit. Computer-readable media may include computer-readable storage media, which corresponds to tangible media such as data storage media, or communication media, including any media that facilitates the transfer of computer programs from one place to another, for example, according to a communication protocol. In this manner, computer-readable media may generally correspond to (1) non-temporary tangible computer-readable storage media or (2) communication media such as signals or carrier waves. Data storage media may be any available media that can be accessed by one or more computers or one or more processors to retrieve instructions, codes, and / or data structures to implement the techniques described in the present disclosure. A computer program product may include a computer-readable medium.
[0221] As an 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 required program code in the form of instructions or data structures and can be accessed by a computer. In addition, any connection is properly referred to as a computer-readable medium. For example, if instructions are transmitted from a website, server or other remote source using coaxial cable, fiber optic cable, twisted pair, digital subscriber line (DSL) or wireless technologies such as infrared, radio and microwave, then coaxial cable, fiber optic cable, twisted pair, DSL or wireless technologies such as infrared, radio and microwave are included in the definition of medium. However, it should be understood that computer-readable storage media and data storage media do not include connections, carriers, signals or other temporary media, but are directed to non-temporary, tangible storage media. As used herein, disks and discs include compact discs (CDs), laser discs, optical discs, digital versatile discs (DVDs), floppy disks and Blu-ray discs, where the discs usually reproduce data magnetically, while the discs reproduce data optically by lasers. Combinations of the above should also be included in the scope of computer-readable media.
[0222] 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 circuit" 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 functions 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.
[0223] 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 devices configured to perform the disclosed techniques, but do not necessarily need to be implemented by different hardware units. Instead, as described above, the various units may be combined in a codec hardware unit, or provided by a collection of interoperable hardware units including one or more processors as described above, together with appropriate software and / or firmware.
[0224] The specification has described various examples. These and other examples are within the scope of the following claims.
Claims
1. A method for filtering decoded video data, the method comprising: include: Decoding a coding tree unit (CTU) of video data, the CTU comprising a luma block and a chroma block corresponding to the luma block to generate a decoded luma block and a decoded chroma block; as well as One or more functions that apply filtered values to the one or more chroma samples of the chroma block only when the one or more chroma samples and the co-located luma samples of the luma block are on a common side of a virtual boundary, wherein the functions take as input the size of the luma block.
2. The method according to claim 1, in, The CTU conforms to one of the following: 4:4:4 format or 4:2:2 format.
3. The method according to claim 1, further comprising: include: The filtered value is calculated according to scaledSum=Clip3(-(1<<(BitDepth-1)),(1<<(BitDepth-1))-1,(sum+64)>>7), wherein scaledSum represents the filtered value, Clip3 represents a clipping function that rounds the input value to Clip3, BitDepth represents the bit depth of the video data, and sum represents a value calculated from samples of the luminance picture containing the luminance block.
4. The method according to claim 3, further comprising: include: The value of sum is calculated according to the following formula: sum= f[0]*(recPictureL[hx][vy-yP1]-recPictureL[hx][vy])+ f[1]*(recPictureL[hx-1][vy]-recPictureL[hx][vy])+ f[2]*(recPictureL[hx+1][vy]-recPictureL[hx][vy])+ f[3]*(recPictureL[hx-1][vy+yP1]-recPictureL[hx][vy])+ f[4]*(recPictureL[hx][vy+yP1]-recPictureL[hx][vy])+ f[5]*(recPictureL[hx+1][vy+yP1]-recPictureL[hx][vy])+f[6]*(recPictureL[hx][vy+yP2]-recPictureL[hx][vy]), Wherein, recPictureL represents the brightness picture including the brightness block.
5. The method according to claim 1, in, Performing the one or more functions of applying the filtered value to the one or more chroma samples only when the one or more chroma samples of the chroma block and the co-located luma sample of the luma block are on the common side of the virtual boundary comprises: if(y<CtbSizeY / SubHeightC–2and y*SubHeightC> =CtbSizeY–4),scaledSum=0, sum = curr + scaledSum, and CC-ALFPicture[xCtbC+x][yCtbC+y]=Clip3(0,(1< <BitDepth)-1,sum) Among them, CtbSizeY represents the size of the luma block, SubHeightC is determined according to the chroma format of the CTU, sum represents a value calculated from samples of the luma picture including the luma block, curr represents the current value of one of the samples of the chroma block before filtering, scaledSum represents the filtered value, CC-ALFPicture represents the filtered chroma picture corresponding to the chroma block, xCtbC+x represents the x position of the sample of the filtered chroma picture, yCtbC+y represents the y position of the sample of the filtered chroma picture, and BitDepth represents the bit depth of the video data.
6. The method according to claim 1, further comprising: include: Before decoding the CTU, the CTU is encoded.
7. A device for filtering decoded video data, the device include: a memory configured to store video data; as well as One or more processors, embodied in circuitry and configured to: Decoding a coding tree unit (CTU) of video data, the CTU comprising a luma block and a chroma block corresponding to the luma block to generate a decoded luma block and a decoded chroma block; as well as One or more functions that apply filtered values to the one or more chroma samples of the chroma block only when the one or more chroma samples and the co-located luma samples of the luma block are on a common side of a virtual boundary, wherein the functions take as input the size of the luma block.
8. The device according to claim 7, in, The CTU conforms to one of the following: 4:4:4 format or 4:2:2 format.
9. The device according to claim 7, in, The one or more processors are also configured to calculate the filtered value according to scaledSum=Clip3(-(1<<(BitDepth-1)),(1<<(BitDepth-1))-1,(sum+64)>>7), wherein scaledSum represents the filtered value, Clip3 represents a clipping function that rounds the input value to Clip3, BitDepth represents the bit depth of the video data, and sum represents a value calculated from samples of the luminance picture containing the luminance block.
10. The device according to claim 9, in, The one or more processors are further configured to calculate the value of sum according to the following formula: sum= f[0]*(recPictureL[hx][vy-yP1]-recPictureL[hx][vy])+ f[1]*(recPictureL[hx-1][vy]-recPictureL[hx][vy])+ f[2]*(recPictureL[hx+1][vy]-recPictureL[hx][vy])+ f[3]*(recPictureL[hx-1][vy+yP1]-recPictureL[hx][vy])+ f[4]*(recPictureL[hx][vy+yP1]-recPictureL[hx][vy])+ f[5]*(recPictureL[hx+1][vy+yP1]-recPictureL[hx][vy])+f[6]*(recPictureL[hx][vy+yP2]-recPictureL[hx][vy]), Wherein, recPictureL represents the brightness picture including the brightness block.
11. The device according to claim 7, in, Performing the one or more functions of applying the filtered value to the one or more chroma samples only when the one or more chroma samples of the chroma block and the co-located luma sample of the luma block are on the common side of the virtual boundary comprises: if(y<CtbSizeY / SubHeightC–2and y*SubHeightC> =CtbSizeY–4),scaledSum=0, sum = curr + scaledSum, and CC-ALFPicture[xCtbC+x][yCtbC+y]=Clip3(0,(1< <BitDepth)-1,sum), Among them, CtbSizeY represents the size of the luma block, SubHeightC is determined according to the chroma format of the CTU, sum represents a value calculated from samples of the luma picture including the luma block, curr represents the current value of one of the samples of the chroma block before filtering, scaledSum represents the filtered value, CC-ALFPicture represents the filtered chroma picture corresponding to the chroma block, xCtbC+x represents the x position of the sample of the filtered chroma picture, yCtbC+y represents the y position of the sample of the filtered chroma picture, and BitDepth represents the bit depth of the video data.
12. The device according to claim 7, in, The one or more processors are further configured to encode the CTU prior to decoding the CTU.
13. A non-transitory computer-readable storage medium having stored thereon instructions that, when executed, cause a processor to: Decoding a coding tree unit (CTU) of video data, the CTU comprising a luma block and a chroma block corresponding to the luma block to generate a decoded luma block and a decoded chroma block; and performing one or more functions that apply filtered values to the one or more chroma samples of the chroma block only when the one or more chroma samples and a co-located luma sample of the luma block are on a common side of a virtual boundary, in, The function takes as input the size of the luminance block.
14. The non-transitory computer-readable storage medium of claim 13, in, The CTU conforms to one of the following: 4:4:4 format or 4:2:2 format.
15. The non-transitory computer-readable storage medium of claim 13, further comprising instructions for causing the processor to: calculate the filtered value according to scaledSum=Clip3(-(1<<(BitDepth-1)),(1<<(BitDepth-1))-1,(sum+64)>>7), in, scaledSum represents a filtered value, Clip3 represents a clipping function that rounds an input value to Clip3, BitDepth represents a bit depth of the video data, and sum represents a value calculated from samples of a luma picture including the luma block.
16. The non-transitory computer-readable storage medium of claim 15, further comprising instructions for causing the processor to perform the following operations: calculate the value of sum according to the following formula: sum= f[0]*(recPictureL[hx][vy-yP1]-recPictureL[hx][vy])+ f[1]*(recPictureL[hx-1][vy]-recPictureL[hx][vy])+ f[2]*(recPictureL[hx+1][vy]-recPictureL[hx][vy])+ f[3]*(recPictureL[hx-1][vy+yP1]-recPictureL[hx][vy])+ f[4]*(recPictureL[hx][vy+yP1]-recPictureL[hx][vy])+ f[5]*(recPictureL[hx+1][vy+yP1]-recPictureL[hx][vy])+f[6]*(recPictureL[hx][vy+yP2]-recPictureL[hx][vy]), in, recPictureL represents the luma picture including the luma block.
17. The non-transitory computer-readable storage medium of claim 13, in, Performing the one or more functions of applying the filtered value to the one or more chroma samples only when the one or more chroma samples of the chroma block and the co-located luma sample of the luma block are on the common side of the virtual boundary comprises: if(y<CtbSizeY / SubHeightC–2and y*SubHeightC> =CtbSizeY–4),scaledSum=0, sum = curr + scaledSum, and CC-ALFPicture[xCtbC+x][yCtbC+y]=Clip3(0,(1< <BitDepth)-1,sum), Among them, CtbSizeY represents the size of the luma block, SubHeightC is determined according to the chroma format of the CTU, sum represents a value calculated from samples of the luma picture including the luma block, curr represents the current value of one of the samples of the chroma block before filtering, scaledSum represents the filtered value, CC-ALFPicture represents the filtered chroma picture corresponding to the chroma block, xCtbC+x represents the x position of the sample of the filtered chroma picture, yCtbC+y represents the y position of the sample of the filtered chroma picture, and BitDepth represents the bit depth of the video data.
18. The non-transitory computer-readable storage medium of claim 13, further comprising instructions that cause the processor to: encode the CTU before decoding the CTU.
19. A device for filtering decoded video data, the device include: means for decoding a coding tree unit (CTU) of video data, the CTU comprising a luma block and a chroma block corresponding to the luma block to produce a decoded luma block and a decoded chroma block; as well as Means for executing one or more functions that apply filtered values to the one or more chroma samples of the chroma block only when the one or more chroma samples and the co-located luma samples of the luma block are on a common side of a virtual boundary, wherein the functions have as input the size of the luma block.
20. The device according to claim 19, in, The CTU conforms to one of the following: 4:4:4 format or 4:2:2 format.
