Position dependent intra prediction combination of angular intra prediction modes for video coding

By using gradient position-related intra-frame prediction combination (gradient PDPC), the problem of unavailable reference pixels in angle intra-frame prediction mode is solved, thereby improving the compression performance and coding efficiency of video coding.

CN114731394BActive Publication Date: 2025-10-24QUALCOMM INC
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202080079213.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Priority Date
2020-12-08
Filing Date
2020-12-09
Publication Date
2025-10-24
Estimated Expiration
2040-12-09

AI Technical Summary

Technical Problem

When existing video coding and decoding technologies process angular intra prediction modes, conventional Position Dependent Intra Prediction Combining (PDPC) cannot be applied to situations where reference pixels are unavailable, resulting in reduced coding efficiency.

Method used

The gradient position-related intra-frame prediction combination (gradient PDPC) is adopted to generate the value of unusable sub-boundary samples by calculating the gradient term of the samples, thereby realizing the angle intra-frame prediction mode.

Benefits of technology

It improves the compression performance of video encoding and enhances encoding efficiency, especially in the angle intra-frame prediction mode, which improves encoding quality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114731394B_ABST
    Figure CN114731394B_ABST
Patent Text Reader

Abstract

An example device for decoding video data includes a memory configured to store video data and one or more processors implemented in circuitry configured to: generate an intra prediction block for a current block of the video data using an angular intra prediction mode, the angular intra prediction mode being a top-right angular intra prediction mode or a bottom-left angular intra prediction mode; determine a prediction direction for the angular intra prediction mode; for at least one sample of the intra prediction block for the current block: calculate a gradient term for the at least one sample along the prediction direction; and combine a value of an intra predicted sample of the intra prediction block at a location of the at least one sample of the intra prediction block with the gradient term to produce a value of the at least one sample of the intra prediction block; and decode the current block using the intra prediction block.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] CROSS-REFERENCE TO RELATED APPLICATIONS

[0002] This application claims the benefit of U.S. Application No. 17 / 115,455, filed on December 8, 2020, U.S. Provisional Application No. 62 / 945,725, filed on December 9, 2019, and U.S. Provisional Application No. 62 / 989,316, filed on March 13, 2020, the entire contents of which are incorporated herein by reference. Technical Field

[0003] The present disclosure relates to video coding, including video encoding and video decoding. Background Art

[0004] Digital video capabilities can be incorporated into a variety of devices, including digital televisions, digital live broadcast systems, wireless broadcast systems, personal digital assistants (PDAs), laptop or desktop computers, tablet computers, e-book readers, digital cameras, digital recording devices, digital media players, video game devices, video game consoles, cellular or satellite radio telephones, so-called "smartphones", video teleconferencing devices, video streaming devices, and the like. Digital video devices implement video codec technologies, 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 Codec (AVC), ITU-T H.265 / High Efficiency Video Codec (HEVC), and extensions of these standards. By implementing such video codec technologies, video devices can more efficiently send, receive, encode, decode, and / or store digital video information.

[0005] Video coding techniques include spatial (intra-picture) prediction and / or temporal (inter-picture) prediction to reduce or remove inherent redundancy in video sequences. For block-based video codecs, a video slice (e.g., a video picture or portion of a video picture) may be partitioned into video blocks, which may also be referred to as codec tree units (CTUs), codec units (CUs), and / or codec nodes. Video blocks in an intra-coded (I) slice of a picture are encoded using spatial prediction of 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 of reference samples in neighboring blocks in the same picture or temporal prediction of 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] Generally, this disclosure describes techniques that perform position dependent intra prediction combination (PDPC) for angular intra prediction modes. In PDPC, a video codec (encoder or decoder) generally uses samples of a primary boundary to predict samples of a prediction block, and then uses samples of a secondary (orthogonal) boundary to modify the predicted samples. For example, if the primary boundary is the top boundary of a current block, the video codec can use samples of the left boundary of the current block as the secondary boundary. Likewise, if the primary boundary is the left boundary, the video codec can use the top boundary as the secondary boundary. In some instances, samples of the secondary boundary can not be available, e.g., due to the angle of the intra prediction direction of the current block. Conventionally, in these scenarios, PDPC is disabled. However, according to the techniques of this disclosure, the video codec can perform gradient PDPC, in which case the video codec can compute a gradient term for a sample and use the gradient term to produce a value for at least one sample of the intra prediction block, rather than an actual sample of the secondary boundary.

[0007] In one example, a method of decoding video data includes generating an intra prediction block for a current block of video data using an angular intra prediction mode, the angular intra prediction mode being a top-right angular intra prediction mode or a bottom-left angular intra prediction mode; determining a prediction direction for the angular intra prediction mode; for at least one sample of the intra prediction block of the current block: computing a gradient term for the at least one sample along the prediction direction; and combining a value of an intra predicted sample of the intra prediction block at a location of the at least one sample of the intra prediction block with the gradient term to produce a value for the at least one sample of the intra prediction block; and decoding the current block using the intra prediction block.

[0008] In another example, an apparatus for decoding video data includes a memory configured to store video data; and one or more processors implemented in circuitry configured to: generate an intra prediction block for a current block of video data using an angular intra prediction mode, the angular intra prediction mode being a top-right angular intra prediction mode or a bottom-left angular intra prediction mode; determine a prediction direction for the angular intra prediction mode; for at least one sample of the intra prediction block of the current block: compute a gradient term for the at least one sample along the prediction direction; and combine a value of an intra predicted sample of the intra prediction block at a location of the at least one sample of the intra prediction block with the gradient term to produce a value for the at least one sample of the intra prediction block; and decode the current block using the intra prediction block.

[0009] In another example, a device for decoding video data includes means for generating an intra-predicted block for a current block of video data using an angular intra-prediction mode, the angular intra-prediction mode being a top-right angular intra-prediction mode or a bottom-left angular intra-prediction mode; means for determining a prediction direction of the angular intra-prediction mode; means for, for at least one sample of the intra-predicted block for the current block, calculating a gradient term for the at least one sample along the prediction direction; means for, for the at least one sample of the intra-predicted block for the current block, combining a value of an intra-predicted sample of the intra-predicted block at a location of the at least one sample with the gradient term to produce a value of the at least one sample of the intra-predicted block; and means for decoding the current block using the intra-predicted block.

[0010] In another example, a computer-readable storage medium stores instructions that, when executed, cause a processor to generate an intra-predicted block for a current block of video data using an angular intra-prediction mode, the angular intra-prediction mode being a top-right angular intra-prediction mode or a bottom-left angular intra-prediction mode; determine a prediction direction of the angular intra-prediction mode; for at least one sample of the intra-predicted block for the current block: calculate a gradient term for the at least one sample along the prediction direction; and combine a value of an intra-predicted sample of the intra-predicted block at a location of the at least one sample with the gradient term to produce a value of the at least one sample of the intra-predicted block; and decode the current block using the intra-predicted block.

[0011] The details of one or more examples are set forth in the accompanying drawings and the description below. Other features, objects, and advantages will become apparent from the description, drawings, and the claims. BRIEF DESCRIPTION OF DRAWINGS

[0012] Figure 1 FIG. 1 is a conceptual diagram illustrating example intra-prediction modes that can be used when performing the techniques of this disclosure.

[0013] Figure 2 FIG. 2 is a conceptual diagram illustrating position-dependent intra-prediction combination (PDPC) for intra-prediction modes for nScale values greater than or equal to zero that can be used when performing the techniques of this disclosure.

[0014] Figure 3 FIG. 3 is a conceptual diagram illustrating an example in which the nScale value for a block indicates that position-dependent intra-prediction combination (PDPC) is not applied to the block that can be used when performing the techniques of this disclosure.

[0015] Figure 4is a conceptual diagram illustrating nScale values as a function of transform block height (nTbH) and mode number that can be used when performing the techniques of this disclosure.

[0016] Figure 5 is a block diagram illustrating an example video encoding and decoding system that can perform the techniques of this disclosure.

[0017] Figure 6 is a conceptual diagram illustrating an example data set that can be used for gradient position dependent prediction combination (PDPC) for a given intra prediction angle using the techniques of this disclosure.

[0018] Figure 7 is a conceptual diagram illustrating an example data set that can be used for gradient position dependent prediction combination (PDPC) for a vertical mode using the techniques of this disclosure.

[0019] Figure 8 is a block diagram illustrating an example video encoder that can perform the techniques of this disclosure.

[0020] Figure 9 is a block diagram illustrating an example video decoder that can perform the techniques of this disclosure.

[0021] Figure 10 is a flowchart illustrating an example method of encoding a current block according to the techniques of this disclosure.

[0022] Figure 11 is a flowchart illustrating an example method of decoding a current block according to the techniques of this disclosure.

[0023] Figure 12 is a flowchart illustrating an example method of using gradient PDPC to predict a block according to the techniques of this disclosure. DETAILED DESCRIPTION

[0024] Video coding standards include ITU-T H.261, ISO / IEC MPEG-1 Visual, ITU-T H.262 or ISO / IEC MPEG-2 Visual, ITU-T H.263, ISO / IEC MPEG-4 Visual (MPEG-4 Part 2), ITU-T H.264 (also known as ISO / IEC MPEG-4 AVC), including its Scalable Video Coding (SVC) and Multiview Video Coding (MVC) extensions, and ITU-T H.265 (also known as ISO / IEC MPEG-4 HEVC (High Efficiency Video Coding) and its extensions. During the Joint Video Experts Team (JVET) meeting in April 2018, the Versatile Video Coding (VVC) standardization activity (also known as ITU-T H.266) began evaluating video compression technologies submitted to a call for proposal. The techniques of this disclosure can be applied to other video coding standards, such as Essential Video Coding (EVC), “Text of ISO / IEC CD 23094-1, Essential Video Coding,” MPEG-5, ISO / IEC CD 23094-1, July 22, 2019, available at mpeg.chiariglione.org / standards / mpeg-5 / essential-video-coding / text-isoiec-cd-23094-1-essential-video-coding.

[0025] Figure 1 is a conceptual diagram showing example intra prediction modes that can be used when performing the techniques of this disclosure. Figure 1 The modes of correspond to examples of the modes in the Versatile Video Coding (VVC) Test Model (VTM) 7.0. To capture arbitrary edge directions present in natural video, the number of directional intra modes in VTM5 was increased from 33 used in HEVC to 65. In Figure 1 Table 8 of depicts the new directional modes in VVC, and the planar and DC modes remain the same as in HEVC. These denser directional intra prediction modes apply to all block sizes and both luma and chroma intra prediction. In J. Chen, Y. Ye, S. Kim, “Algorithm description for Versatile Video Coding and Test Model 7 (VTM5),” 16 thThis is explained in JVET Meeting, Geneva, CH, Oct. 2019, JVET-P1002.

[0026] In VVC, position-dependent intra prediction combination (PDPC) is an intra prediction method applied to a current block (e.g., luma or chroma component) by which a video codec (encoder or decoder) combines an initial intra prediction signal with boundary reference samples (which can be unfiltered or filtered) to generate a final prediction signal for the current block. According to VVC, a video codec applies PDPC to the following intra modes without signaling: Planar, DC, Horizontal, Vertical, and angular modes with positive angles (modes with mode number less than 18 or greater than 50). In B. Bross, J. Chen, S. Liu, “Versatile Video Coding (Draft 7),” 16 th This is further explained in JVET Meeting, Geneva, CH, Mar. 2019, JVET-P1001.

[0027] Figure 2 is a conceptual diagram illustrating position-dependent intra prediction combination (PDPC) for intra prediction modes for nScale values greater than or equal to zero that can be used when performing the techniques of the present disclosure. Specifically, Figure 2 A current block 10 is shown that includes intra prediction samples 12. In this example, the intra prediction samples 12 are located at positions (x, y), where the top-left intra prediction sample of the current block 10 is located at position (0, 0). As shown, Figure 2 For angular intra prediction modes, for a given intra prediction direction (indicated by arrow 14), the reference pixel 16 (at position r(x + d, -1) in Figure 2 For PDPC, the diagonally opposite reference pixel is the reference pixel 18 (at position r(-1, y + d1) in Figure 2 However, depending on the coding unit (CU) dimensions and the prediction direction, the diagonally opposite reference pixel can not necessarily be available. Such unavailable reference pixels can be referred to as being outside the “PDPC range.” According to conventional VVC, PDPC cannot be applied to such cases.

[0028] Figure 3is a conceptual diagram illustrating a scenario in which the techniques of this disclosure can be used, where the nScale value of block 20 indicates that position dependent intra prediction combination (PDPC) is not applied to block 20. In VTM-7.0, the “PDPC range” is not explicitly checked for every pixel. Instead, the video codec modifies the factor “nScale” to be derived from the prediction direction (invAngle) and the block dimension, which automatically specifies the “PDPC range” or the region where PDPC should be applied, as explained in F. Bossen, “On general intra sample prediction”, 15th th JVET Meeting, Gothenburg, SE, Jul. 2019, JVET-O0364. With this modification, the video codec applies PDPC on (x < (3 « nScale)) or (y < (3 « nScale)) depending on whether the mode number is greater than 50 or less than 18. Thus, when (nScale < 0) PDPC is not applied (as Figure 3 For a given prediction direction 22 for the lower-left pixel 24 within block 20, the diagonally opposite reference pixel is not available. Thus, using the regular techniques of VVC, PDPC cannot be applied even for the pixels in the first column of the block.

[0029] Figure 4 is a conceptual diagram including a chart 30 illustrating nScale values as a function of transform block height (nTbH) and mode number that can be used when performing the techniques of this disclosure. For some prediction directions and block dimensions (e.g., transform block (TB) sizes), PDPC is not applied for nScale < 0. Figure 4 The nScale values for different prediction directions (indicated by mode numbers) and block dimensions (e.g., transform block (TB) sizes) are shown in Table 1. This disclosure describes various alternatives for computing PDPC, which can provide better compression performance for those cases.

[0030] Figure 5 is a block diagram illustrating an example video encoding and decoding system 100 in which techniques of this disclosure can be performed. The techniques of this disclosure generally relate to coding (encoding and / or decoding) video data. In general, video data includes any data for processing video. Thus, video data can include raw, uncoded video, coded video, decoded (e.g., reconstructed) video, and video metadata, such as signaling data.

[0031] As Figure 5As shown, in this example, system 100 includes a source device 102 that provides encoded video data to be decoded and displayed by a destination device 116. In particular, source device 102 provides video data to destination device 116 via computer-readable medium 110. Source device 102 and destination device 116 can comprise any of a wide variety of devices, including desktop computers, notebook (i.e., laptop) computers, tablet computers, set-top boxes, telephone handsets such as smartphones, televisions, cameras, display devices, digital media players, video gaming consoles, video streaming devices, and the like. In some cases, source device 102 and destination device 116 can be equipped for wireless communication, and thus source device 102 and destination device 116 can be referred to as wireless communication devices.

[0032] In Figure 5 In the example of FIG. 1, source device 102 includes video source 104, memory 106, video encoder 200, and output interface 108. Destination device 116 includes input interface 122, video decoder 300, memory 120, and display device 118. In accordance with this disclosure, video encoder 200 of source device 102 and video decoder 300 of destination device 116 can be configured to apply techniques for performing position-dependent intra prediction combination (PDPC) to angular intra prediction modes. Thus, source device 102 represents an example of a video encoding device, while destination device 116 represents an example of a video decoding device. In other examples, a source device and a destination device can include other components or arrangements. For example, source device 102 can receive video data from an external video source, such as an external camera. Likewise, destination device 116 can interface with an external display device, rather than include an integrated display device.

[0033] Figure 5 The system 100 illustrated is merely one example. In general, any digital video encoding and / or decoding device can perform techniques for performing position-dependent intra prediction combination (PDPC) for angular intra prediction modes. Source device 102 and destination device 116 are merely examples of such codec devices, in which source device 102 generates encoded video data for transmission to destination device 116. This disclosure refers to a “codec” device as a device that performs encoding (encoding and / or decoding) of data. Thus, video encoder 200 and video decoder 300 represent examples of codec devices, specifically, a video encoder and a video decoder, respectively. In some examples, source device 102 and destination device 116 can operate in a substantially symmetrical manner, such that each of source device 102 and destination device 116 includes video encoding and decoding components. Hence, system 100 can support one-way or two-way video transmission between source device 102 and destination device 116, e.g., for video streaming, video playback, video broadcasting, or video telephony.

[0034] In general, video source 104 represents a source of video data (i.e., raw, unencoded video data) and provides a continuous series of pictures (also referred to as “frames”) of the video data to video encoder 200, which encodes data for the pictures. Video source 104 of source device 102 can include a video capture device, such as a video camera, a video archive containing previously captured raw video, and / or a video feed interface to receive video from a video content provider. As a further alternative, video source 104 can generate computer graphics-based data as the source video, or a combination of live video, archived video, and computer-generated data. In each case, video encoder 200 encodes the captured, pre-captured, or computer-generated video data. Video encoder 200 can rearrange the pictures from the received order (sometimes referred to as “display order”) into an encoding order for encoding. Video encoder 200 can generate a bitstream including encoded video data. Source device 102 can then output the encoded video data via output interface 108 onto computer-readable medium 110 for reception and / or retrieval by, e.g., input interface 122 of destination device 116.

[0035] Memory 106 of source device 102 and memory 120 of destination device 116 represent general purpose memories. In some examples, memories 106, 120 can store raw video data, e.g., raw video from video source 104 and raw, decoded video data from video decoder 300. Additionally or alternatively, memories 106, 120 can store software instructions executable by, e.g., video encoder 200 and video decoder 300, respectively. Although shown as separate from video encoder 200 and video decoder 300 in this example, it is to be understood that video encoder 200 and video decoder 300 can each include internal memories for similar or equivalent purposes. Furthermore, memories 106, 120 can store encoded video data, e.g., output from video encoder 200 and input to video decoder 300. In some examples, portions of memories 106, 120 can be allocated as one or more video buffers, e.g., to store raw, decoded, and / or encoded video data.

[0036] Computer-readable medium 110 can represent any type of medium or device capable of storing encoded video data from source device 102 and communicating that encoded video data to destination device 116. In one example, computer-readable medium 110 represents a communication medium to enable source device 102 to transmit encoded video data directly to destination device 116 in real-time, e.g., via a radio frequency network or computer-based network. Output interface 108 can modulate a transmission signal including the encoded video data, and input interface 122 can demodulate the received transmission signal, according to a communication standard, such as a wireless communication protocol. The communication medium can comprise any wireless or wired communication medium, such as a radio frequency (RF) spectrum or one or more physical transmission lines. The communication medium can 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 can include routers, switches, base stations, or any other equipment that can be useful to facilitate communication from source device 102 to destination device 116.

[0037] In some examples, source device 102 can output encoded data from output interface 108 to storage device 112. Similarly, destination device 116 can access encoded data from storage device 112 via input interface 122. Storage device 112 can include any of a variety of distributed or locally accessed data storage media such as a hard drive, Blu-ray discs, DVDs, CD-ROMs, flash memory, volatile or non-volatile memory, or any other suitable digital storage media for storing encoded video data.

[0038] In some examples, source device 102 can output encoded video data to file server 114 or another intermediate storage device that can store encoded video generated by source device 102. Destination device 116 can access stored video data from file server 114 via streaming or download. File server 114 can be any type of server device that is capable of storing encoded video data and transmitting that encoded video data to destination device 116. File server 114 can represent a web server (e.g., for a website), a file transfer protocol (FTP) server, a content delivery network device, or a network attached storage (NAS) device. Destination device 116 can access encoded video data from file server 114 by any standard data connection, including an Internet connection. This can include a wireless channel (e.g., a Wi-Fi connection), a wired connection (e.g., digital subscriber line (DSL), a cable modem, etc.), or a combination of both that is suitable for accessing encoded video data stored on file server 114. File server 114 and input interface 122 can be configured to operate according to a streaming protocol, a download transmission protocol, or a combination thereof.

[0039] The output interface 108 and the input interface 122 may represent wireless transmitters / receivers, modems, wired network components (e.g., Ethernet cards), wireless communication components operating according to various IEEE 802.11 standards, or other physical components. In examples where the output interface 108 and the input interface 122 include wireless components, the output interface 108 and the 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 the output interface 108 includes a wireless transmitter, the output interface 108 and the input interface 122 may be configured to transmit data (such as encoded video data) according to other wireless standards such as the IEEE 802.11 specifications, the IEEE 802.15 specifications (e.g., ZigBee TM ), Bluetooth TM Standards, etc.) for transmitting data (such as encoded video data). In some examples, source device 102 and / or destination device 116 may include respective system-on-chip (SoC) devices. For example, source device 102 may include an SoC device to perform the functions attributed to video encoder 200 and / or output interface 108, and destination device 116 may include an SoC device to perform the functions attributed to video decoder 300 and / or input interface 122.

[0040] The techniques of the present disclosure can be applied to video encoding and decoding to support any of a variety of multimedia applications, such as over-the-air television broadcasting, cable television transmission, satellite television transmission, Internet streaming video transmission, such as Dynamic Adaptive Streaming over HTTP (DASH), digital video encoded onto a data storage medium, decoding of digital video stored on a data storage medium, or other applications.

[0041] The input interface 122 of the destination device 116 receives an encoded video bitstream from the computer-readable medium 110 (e.g., the storage device 112, the file server 114, etc.). The encoded video bitstream may include signaling information defined by the video encoder 200 and used by the video decoder 300, such as syntax elements with values ​​describing characteristics and / or processing of video blocks or other coded units (e.g., slices, pictures, groups of pictures, sequences, etc.). The display device 118 displays decoded pictures of the decoded video data to a user. The display device 118 may represent any of a variety of display devices, such as a 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.

[0042] Although not in Figure 5Although not shown, in some examples, video encoder 200 and video decoder 300 can each be integrated with an audio encoder and / or audio decoder, and can include appropriate MUX-DEMUX units, or other hardware and / or software, to handle multiplexed streams including both audio and video in a common data stream. If applicable, the MUX-DEMUX units can conform to the ITU H.223 multiplexer protocol, or other protocols such as the user datagram protocol (UDP).

[0043] Video encoder 200 and video decoder 300 each can be implemented as any of a variety of suitable encoder and / or decoder circuitry, such as one or more microprocessors, digital signal processors (DSPs), application specific integrated circuits (ASICs), field programmable gate arrays (FPGAs), discrete logic, software, hardware, firmware or any combinations thereof. When the techniques are implemented partially in software, a device can store instructions for the software in a suitable, non- transitory computer-readable medium and execute the instructions in hardware using one or more processors to perform the techniques of this disclosure. Each of video encoder 200 and video decoder 300 can be included in one or more encoders or decoders, either of which can be integrated as part of a combined video encoder / decoder (CODEC) in a respective device. A device including video encoder 200 and / or video decoder 300 can comprise an integrated circuit, a microprocessor, and / or a wireless communication device, such as a cellular telephone.

[0044] Video encoder 200 and video decoder 300 can operate according to a video coding standard, such as ITU-T H.265, also referred to as High Efficiency Video Coding (HEVC) or extensions such as multi-view and / or scalable video coding extensions. Alternatively, video encoder 200 and video decoder 300 can operate according to other proprietary or industry standards, such as the Joint Exploration Test Model (JEM) or ITU-T H.266, also referred to as Versatile Video Coding (VVC). The techniques of this disclosure, however, are not limited to any particular coding standard.

[0045] In general, video encoder 200 and video decoder 300 can perform block-based coding of pictures. The term “block” generally refers to a structure comprising data to be processed (e.g., encoded, decoded, or otherwise used in the encoding and / or decoding process). For example, a block can comprise a two-dimensional matrix of samples of luma and / or chroma data. In general, video encoder 200 and video decoder 300 can code video data represented in a YUV (e.g., Y, Cb, Cr) format. That is, rather than coding samples of red, green, and blue (RGB) data of a picture, video encoder 200 and video decoder 300 can code luma and chroma components, where the chroma components can include both red hue and blue hue chroma components. In some examples, video encoder 200 converts received data in an RGB format to a YUV representation prior to encoding, and video decoder 300 converts the YUV representation to the RGB format. Alternatively, pre- and post-processing units (not shown) can perform these conversions.

[0046] This disclosure can generally refer to coding (e.g., encoding and decoding) of pictures, including the process of encoding or decoding data of a picture. Similarly, this disclosure can refer to coding of blocks of pictures to include the process of encoding or decoding data of a block, e.g., prediction and / or residual coding. An encoded video bitstream generally includes a series of values representing coding decisions (e.g., coding modes) and syntax elements partitioning a picture into blocks. Accordingly, a reference to coding a picture or block should generally be understood to refer to coding values of syntax elements forming the picture or block.

[0047] HEVC defines various blocks, including coding units (CUs), prediction units (PUs), and transform units (TUs). According to HEVC, a video coder, such as video encoder 200, partitions coding tree units (CTUs) into CUs according to a quadtree structure. That is, the video coder partitions CTUs and CUs into four equal, non overlapping squares, and each node of the quadtree has either zero or four child nodes. Nodes with zero child nodes can be referred to as “leaf nodes,” and CUs of such leaf nodes can include one or more PUs and / or one or more TUs. Video coder can further partition PUs and TUs. For example, in HEVC, a residual quadtree (RQT) represents partitioning of TUs. In HEVC, PUs represent inter-predicted data, while TUs represent residual data. Intra-predicted CUs include intra-prediction information, such as an intra-mode indication.

[0048] As another example, video encoder 200 and video decoder 300 can be configured to operate according to JEM or VVC. According to JEM or VVC, a video coder (such as video encoder 200) partitions a picture into coding tree units (CTU). Video encoder 200 can partition a CTU according to a tree structure such as a quadtree-binary tree (QTBT) structure or Multi-Type Tree (MTT) structure. The QTBT structure removes the concepts of the different split types such as CUs, PUs, and TUs of HEVC. The QTBT structure includes two levels: a first level of partitioning according to quadtree partitioning, and a second level of partitioning according to binary tree partitioning. A root node of the QTBT structure corresponds to a CTU. Leaf nodes of the binary trees correspond to coding units (CUs).

[0049] In the MTT partitioning structure, a block can be partitioned using quadtree (QT) partitioning, binary tree (BT) partitioning, and one or more types of ternary tree (TT) partitioning. Ternary tree partitioning is a partitioning that divides a block into three sub-blocks. In some examples, a ternary tree partitioning divides a block into three sub-blocks without dividing the original block through a center split. The partitioning types (e.g., QT, BT, and TT) in the MTT can be symmetric or asymmetric.

[0050] In some examples, video encoder 200 and video decoder 300 can use a single QTBT or MTT structure to represent each of luma and chroma components, while in other examples, video encoder 200 and video decoder 300 can use two or more QTBT or MTT structures, such as one QTBT / MTT structure for luma components and another QTBT / MTT structure for both chroma components (or two QTBT / MTT structures for respective chroma components).

[0051] Video encoder 200 and video decoder 300 can be configured to use HEVC quadtree partitioning, QTBT partitioning, MTT partitioning, or other partition structures per HEVC. For purposes of explanation, the description of the techniques of this disclosure is presented relative to QTBT partitioning. However, it should be understood that the techniques of this disclosure can also be applied to video coders configured to use quadtree partitioning or other types of partitioning.

[0052] Blocks (e.g., CTUs or CUs) can be grouped in various ways in a picture. As one example, a brick can refer to a rectangular region of CTU rows within a particular tile in a picture. A tile can be a rectangular region of CTUs within a particular tile column and a particular tile row in a picture. A tile column refers to a rectangular region of CTUs having a height equal to the height of the picture and a width specified by a syntax element (e.g., in a picture parameter set). A tile row refers to a rectangular region of CTUs 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.

[0053] In some examples, a tile can be partitioned into multiple bricks, each of which can include one or more CTU rows within the tile. A tile that is not partitioned into multiple bricks can also be referred to as a brick. However, a brick that is a true subset of a tile can not be referred to as a tile.

[0054] Bricks in a picture can also be arranged in slices. A slice can be an integer number of bricks in a picture that can be exclusively contained in a single network abstraction layer (NAL) unit. In some examples, a slice includes multiple complete tiles or a contiguous sequence of complete bricks of only one tile.

[0055] The disclosure can use“NxN” and“N by N” interchangeably to refer to the sample dimensions of a block (such as a CU or other video block) in the vertical and horizontal dimensions, e.g., 16x16 samples or 16 by 16 samples. In general, a 16x16 CU has 16 samples in the vertical direction (y = 16) and 16 samples in the horizontal direction (x = 16). Likewise, an NxN CU generally has N samples in the vertical direction and N samples in the horizontal direction, where N represents a nonnegative integer value. The samples in a CU can be arranged in rows and columns. Moreover, a CU need not have the same number of samples in the horizontal direction as in the vertical direction. For example, a CU can comprise NxM samples, where M need not equal N.

[0056] Video encoder 200 encodes video data for CUs that represent prediction and / or residual information, among other information. Prediction information indicates how to predict a CU in order to form a prediction block for the CU. Residual information generally represents a sample-by-sample difference between the CU samples before encoding and the prediction block samples.

[0057] To code a CU, video encoder 200 generally can form a prediction block for the CU through inter prediction or intra prediction. Inter prediction generally refers to predicting the CU from data of a previously coded picture, whereas intra prediction generally refers to predicting the CU from previously coded data of the same picture. To perform inter prediction, video encoder 200 can use one or more motion vectors to generate the prediction block. Video encoder 200 can generally perform a motion search to identify a reference block that closely matches the CU, e.g., in terms of differences between the CU and the reference block. Video encoder 200 can calculate a difference metric using a sum of absolute difference (SAD), sum of squared differences (SSD), mean absolute difference (MAD), mean squared differences (MSD), or other such difference calculations to determine whether a reference block closely matches a current CU. In some examples, video encoder 200 can use single or bi-prediction to predict a current CU.

[0058] Some examples of JEM and VVC also provide an affine motion compensation mode, which can be considered a type of inter prediction mode. In affine motion compensation mode, video encoder 200 can determine two or more motion vectors that represent non-translational motion, such as scaling or zooming, rotation, perspective motion, or other types of irregular motion.

[0059] To perform intra prediction, video encoder 200 can select an intra prediction mode to generate the prediction block. Some examples of JEM and VVC provide 67 intra prediction modes, including various directional modes, as well as a planar mode and a DC mode. Generally, video encoder 200 selects an intra prediction mode that describes neighboring samples of the current block (e.g., a block of a CU) from which to predict samples of the current block according to the mode. Assuming video encoder 200 encodes CTUs and CUs in a raster scan order (left to right, top to bottom), these samples can generally be above, above and to the left, or to the left of the current block in the same picture as the current block.

[0060] Video encoder 200 encodes data that represents a prediction mode for the current block. For example, for inter prediction modes, video encoder 200 can encode data that indicates which of various available inter prediction modes to use, as well as motion information for the corresponding mode. For example, for uni- or bi-prediction, video encoder 200 can use advanced motion vector prediction (AMVP) or merge mode to encode motion vectors. Video encoder 200 can use similar modes to encode motion vectors for affine motion compensation modes.

[0061] In some examples, video encoder 200 (and similarly video decoder 300) can perform position-dependent intra prediction combination (PDPC) on a current block of video data. As described above, conventionally, PDPC includes combining a standard intra-predicted block with values from neighboring reference pixels (or samples) along the intra-prediction direction (e.g., from opposite boundaries). According to the techniques of this disclosure, in cases where PDPC cannot be conventionally applied due to reference pixels being outside the PDPC range, video encoder 200 and video decoder 300 can instead use "gradient PDPC" to calculate PDPC for angular modes. These techniques can generally be performed for two cases (although other cases are possible as well): Case 1, where the intra-prediction mode is a top-right angular intra-prediction mode (e.g., Figure 1 labeled as 51-80, i.e., modes greater than 50 and less than 81), and Case 2, where the intra-prediction mode is a bottom-right angular intra-prediction mode (e.g., Figure 1 labeled as less than 18, excluding DC and planar modes (0 and 1, respectively)). Reference is made to Figure 6 Gradient PDPC is explained in more detail.

[0062] Generally, PDPC involves using samples of a primary boundary and a secondary boundary to form a prediction block for a current block. However, the two cases above represent angular modes for which samples of the secondary boundary are not available. Accordingly, video encoder 200 and video decoder 300 can calculate a gradient term for one or more samples of the current block along the prediction direction (angle) of the intra-prediction mode. Video encoder 200 and video decoder 300 can then combine the value predicted using the primary boundary with the gradient term to form a prediction sample of the prediction block for the current block. Video encoder 200 and video decoder 300 can calculate the gradient term using a displacement value according to the angle of the corresponding intra-prediction mode. In some examples, video encoder 200 and video decoder 300 can weight the value predicted using the primary boundary and the gradient term, e.g., according to a distance between the location of the predicted sample and the horizontal or vertical neighboring reference pixels.

[0063] Following prediction, such as intra prediction using gradient PDPC modes in accordance with techniques of this disclosure, video encoder 200 can calculate residual data for the block. The residual data, such as a residual block, represents sample-by-sample differences between the block and a prediction block for the block that is formed using a corresponding prediction mode. Video encoder 200 can apply one or more transforms to the residual block to produce transformed data in a transform domain rather than the sample domain. For example, video encoder 200 can apply a discrete cosine transform (DCT), an integer transform, a wavelet transform, or a conceptually similar transform. Moreover, video encoder 200 can apply a second transform following the first transform, such as a mode-dependent non-separable secondary transform (MDNSST), a signal-dependent transform, a Karhunen-Loeve transform (KLT), and the like. Video encoder 200 produces transform coefficients following application of the one or more transforms.

[0064] As described above, following any transforms that produce transform coefficients, video encoder 200 can perform quantization of the transform coefficients. Quantization generally refers to a process in which transform coefficients are quantized to possibly reduce the amount of data used to represent the coefficients, providing further compression. By performing the quantization process, video encoder 200 can reduce the bit depth of some or all of the coefficients associated therewith. For example, video encoder 200 can round n-bit values down to m-bit values during quantization, where n is greater than m. In some examples, to perform quantization, video encoder 200 can perform a bitwise right-shift of the values to be quantized.

[0065] Following quantization, video encoder 200 can scan the transform coefficients, producing a one-dimensional vector from the two-dimensional matrix including the quantized transform coefficients. The scan can be designed to place higher energy, hence lower frequency, coefficients toward the front of the vector, and lower energy, hence higher frequency, transform coefficients toward the end of the vector. In some examples, video encoder 200 can utilize a predefined scan order to scan the quantized transform coefficients to produce a serialized vector, and then entropy encode the quantized transform coefficients of the vector. In other examples, video encoder 200 can perform an adaptive scan. Following scanning of the quantized transform coefficients to form a one-dimensional vector, video encoder 200 can entropy encode the one-dimensional vector, e.g., according to context adaptive binary arithmetic coding (CABAC). Video encoder 200 can also entropy encode values for syntax elements describing metadata associated with the encoded video data for use by video decoder 300 when decoding the video data.

[0066] To perform CABAC, video encoder 200 can assign a context within a context model to a symbol to be transmitted. The context can relate to, for example, whether neighboring values of the symbol are zero-valued or not. The probability determination can be based on a context assigned to the symbol.

[0067] Video encoder 200 can also generate syntax data, such as block-based syntax data, picture-based syntax data, and sequence-based syntax data, e.g., in a picture header, a block header, a slice header, or other syntax data such as a sequence parameter set (SPS), a picture parameter set (PPS), or a video parameter set (VPS), to video decoder 300. Video decoder 300 can likewise decode such syntax data to determine how to decode corresponding video data. In some examples, video encoder 200 can encode and video decoder 300 can decode syntax data for a VPS, SPS, PPS, or other such data structure (e.g., picture header, slice header, block header, etc.) related to gradient PDPC. For instance, the syntax data can indicate whether gradient PDPC is enabled, a value for a gradient PDPC angular intra prediction mode that is determined to be enabled and will be used, and the like.

[0068] In this manner, video encoder 200 can generate a bitstream including encoded video data, e.g., syntax elements describing partitioning of pictures into blocks (e.g., CUs) and prediction information and / or residual information for the blocks. Ultimately, video decoder 300 can receive the bitstream and decode the encoded video data.

[0069] In general, video decoder 300 performs a reciprocal process to that performed by video encoder 200 to decode the encoded video data of the bitstream. For example, video decoder 300 can use CABAC in a manner substantially similar, albeit reciprocal, to the CABAC encoding process by video encoder 200 to decode values for syntax elements of the bitstream. The syntax elements can define partitioning information partitioning pictures into CTUs and partitioning of each CTU according to a corresponding partition structure, such as a QTBT structure, to define CUs of the CTU. The syntax elements can further define prediction information and residual information for blocks (e.g., CUs) of the video data.

[0070] The residual information can be represented by, for example, quantized transform coefficients. Video decoder 300 can inverse quantize and inverse transform the quantized transform coefficients of a block to reproduce a residual block for the block. Video decoder 300 forms a prediction block for the block using the signaled prediction mode (intra prediction or inter prediction) and associated prediction information (e.g., motion information for inter prediction). Video decoder 300 can then combine (on a sample-by-sample basis) the prediction block and the residual block to reproduce the original block. Video decoder 300 can perform additional processing, such as performing a deblocking process to reduce visual artifacts along boundaries of the block.

[0071] The disclosure can generally refer to "signaling" certain information, such as syntax elements. The term "signaling" can generally refer to the communication of values for syntax elements and / or other data used to decode encoded video data. That is, video encoder 200 can signal the values of the syntax elements in the bitstream. Generally, signaling refers to generating the values in the bitstream. As described above, source device 102 can transmit the bitstream to destination device 116 in real time or non-real time, such as can occur when storing the syntax elements to storage device 112 for later retrieval by destination device 116.

[0072] In VVC, a CU can be partitioned using quad-tree partitioning, binary-tree partitioning, and / or center-side triple partitioning. In each partition (i.e., non-leaf) node of a binary tree, one flag can be signaled to indicate which type of partition (i.e., horizontal or vertical) is used, where 0 can indicate horizontal partition and 1 can indicate vertical partition. For quad-tree partitioning, the partition type does not need to be indicated because a quad-tree node partitions a block horizontally and vertically into 4 equally sized sub-blocks. Thus, video encoder 200 can encode and video decoder 300 can decode syntax elements (such as partition information) for the region tree level of the QTBT structure and syntax elements (such as partition information) for the prediction tree level of the QTBT structure. Video encoder 200 can encode and video decoder 300 can decode video data, such as prediction and transform data, for CUs represented by terminal leaf nodes of the QTBT structure.

[0073] Generally, a CTU can be associated with parameters defining block sizes corresponding to nodes of the first and second level QTBT structures. These parameters can include a CTU size (representing a size of a CTU in samples), a minimum quad-tree size (MinQTSize representing a minimum allowed quad-tree leaf node size), a maximum binary-tree size (MaxBTSize representing a maximum allowed binary-tree root node size), a maximum binary-tree depth (MaxBTDepth representing a maximum allowed binary-tree depth), and a minimum binary-tree size (MinBTSize representing a minimum allowed binary-tree leaf node size).

[0074] The root node of the QTBT structure corresponding to a CTU can have four child nodes at the first level of the QTBT structure, each of which can be partitioned according to quadtree partitioning. That is, a node at the first level is either a leaf node (having no child nodes) or has four child nodes. If the nodes at the first level are not larger than a maximum allowed binary tree root node size (MaxBTSize), they can be further partitioned by a corresponding binary tree. The binary tree partitioning of a node can be iterated until the partitioning of the node results in nodes that are at a minimum allowed binary tree leaf node size (MinBTSize) or at a maximum allowed binary tree depth (MaxBTDepth). The binary tree leaf nodes are referred to as coding units (CUs), which are used for prediction (e.g., intra prediction or inter prediction) and transform without any further partitioning. As discussed above, a CU can also be referred to as a “video block” or “block.”

[0075] In one example of the QTBT partitioning structure, the CTU size is set to 128x128 (luma samples and two corresponding 64x64 chroma samples), the MinQTSize is set to 16x16, the MaxBTSize is set to 64x64, the MinBTSize (for both width and height) is set to 4, and the MaxBTDepth is set to 4. The quadtree partitioning is applied to the CTU first to generate quadtree leaf nodes. The quadtree leaf nodes can have a size from 16x16 (i.e., the minimum size) to 128x128 (i.e., the CTU size). If a leaf quadtree node is 128x128, it will not be further partitioned by a binary tree because its size exceeds the MaxBTSize (i.e., 64x64 in this example). Otherwise, the leaf quadtree node will be further partitioned by a binary tree. Thus, the quadtree leaf nodes are also the root nodes of the binary trees, and the binary tree depth is 0. When the binary tree depth reaches the MaxBTDepth (4 in this example), no further partitioning is permitted. When the width of a binary tree node is equal to the MinBTSize (4 in this example), it means that no further horizontal partitioning is permitted. Similarly, the height of a binary tree node being equal to the MinBTSize means that no further vertical partitioning is permitted for that binary tree node. As noted above, the leaf nodes of the binary trees are referred to as CUs and are further processed for prediction and transform without further partitioning.

[0076] Figure 6 is a conceptual diagram illustrating an example data set that can be used to perform gradient position dependent intra prediction combination (PDPC) for a given intra prediction angle using the techniques of this disclosure. Figure 6 A current block 140 including intra prediction samples 142 is shown. To perform gradient PDPC, the video encoder 200 or the video decoder 300 can calculate the gradient of the intra prediction samples 142 along the prediction direction (e.g., the direction of the arrow 144). The gradient can be calculated as the difference between the sample at the top of the block 140 and the sample at the bottom of the block 140.Figure 6 , y)) along the prediction direction and offset (the straight line with the same slope as the prediction direction and containing the sample r(-1, y)), the video encoder 200 and the video decoder 300 may derive the value of the corresponding pixel in the top reference row, such as reference sample 148 ( Figure 6 At position r(-1+d,-1)).

[0077] Similarly, for case 2, for the sample at position (x, y), the video encoder 200 and the video decoder 300 can obtain the value of the vertically aligned reference sample (at position r(x, -1)). To calculate the gradient along the prediction direction and offset (the straight line with the same slope as the prediction direction and containing the sample at position r(x, -1)), the video encoder 200 and the video decoder 300 can derive the corresponding pixel in the left reference row, i.e., r(-1, -1+d).

[0078] like Figure 6 As shown, "d" indicates the horizontal / x (case 1) or vertical / y (case 2) displacement compared to other reference pixels (r(-1, y) for case 1 or r(x, -1) for case 2). VVC describes a process for calculating the value of d. The video encoder 200 and the video decoder 300 can use the intra-frame prediction angle to calculate the value of d before the initial prediction process. "d" can have non-integer (fractional) values. In VVC, the value of "d" is derived with 1 / 32 pixel accuracy (so, for integer pixel displacements, "d" can be a multiple of 32). The video encoder 200 and the video decoder 300 can derive integer (dInt) and fractional (dFrac) (with 1 / 32 pixel accuracy) pixel displacements using the following formula:

[0079] dInt = d>>5;

[0080] dFrac=d&31.

[0081] The video encoder 200 and the video decoder 300 may apply various different techniques to calculate r(-1+d,-1) (for case 1) or r(-1,-1+d) (for case 2) for the fractional pixel position. The function Q(i) may refer to r(-1+i,-1) for case 1 and r(-1,-1+i) for case 2. To calculate Q(i), the video encoder 200 and the video decoder 300 may apply any of the following example techniques:

[0082] a) Closest integer pixel (rounding): Q(d) = Q(dRound), where dRound = (d + 16) » 5.

[0083] b) Linear interpolation (2-tap filter): Q(d) = ((32 - dFrac) * Q(dInt) + dFrac * Q(dInt + 1) + 16) » 5.

[0084] c) Cubic interpolation in VVC (4-tap filter): Q(d) = (fC[0] * Q[dInt - 1] + fC[1] * Q[dInt] + fC[2] * Q[dInt + 1] + fC[3] * Q[dInt + 2] + 32) » 6, where sum(fC[i]) = 64.

[0085] d) Gaussian interpolation in VVC (4-tap filter): Val = (fG[0] * Q[dInt - 1] + fG[1] * Q[dInt] + fG[2] * Q[dInt + 1] + fG[3] * Q[dInt + 2] + 32) » 6, where sum(fG[i]) = 64.

[0086] e) Combination of fC and fG, depending on the prediction direction and block dimension (same or similar as used in the reference pixel smoothing for intra prediction in VVC).

[0087] f) In general, any other finite-tap filter can also be used for interpolation.

[0088] For case 1, the video encoder 200 and the video decoder 300 can calculate the gradient term as r(-1, y) - r(-1 + d, -1). Similarly, for case 2, the video encoder 200 and the video decoder 300 can calculate the gradient term as r(x, -1) - r(-1, -1 + d).

[0089] For case 1, video encoder 200 and video decoder 300 can compute a weight value that depends on the distance between (x, y) and (-1, y) (i.e., on the value of x). The weight value can be defined as wL[x], which can be exponentially decaying with respect to x. For example, video encoder 200 and video decoder 300 can compute wL[x] = (a » ((x « 1) » nScale2), where nScale2 can be derived as (floor(log2(nTbH)) + floor(log2(nTbW)) - 2) » 2, and the value of "a" can be a power of 2 and less than 64, such as 32, 16, 8, 4, etc. For case 2, similarly, video encoder 200 and video decoder 300 can compute a weight wT(y) depending on the distance between (x, y) and (x, -1) as wT[y] = (a » ((y « 1) » nScale2).

[0090] Video encoder 200 and video decoder 300 can compute the final prediction signal (after PDPC application), e.g., as:

[0091] • Case 1: Clip(((64 - wL(x)) * p(x, y) + wL(x) * (r(-1, y) - r(-1 + d, -1)) + 32) » 6)

[0092] • Case 2: Clip(((64 - wT(y)) * p(x, y) + wT(y) * (r(x, -1) - r(-1, -1 + d)) + 32) » 6)

[0093] Video encoder 200 and video decoder 300 can be configured to determine a clipping range using a bit depth (e.g., the bit depth that is currently being processed). For example, for 10 bits, video encoder 200 and video decoder 300 can clip the values to be between 0 and 1023 (2 10 - 1). In general, the clipping range can be (2 比特深度 - 1).

[0094] Figure 7 is a conceptual diagram illustrating an example data set for gradient position dependent intra prediction combination (PDPC) for vertical intra prediction mode 150 that can be used using the techniques of this disclosure. In this example, block 158 includes samples 152. In contrast to conventional PDPC, this disclosure extends gradient PDPC to angular intra prediction modes. Figure 7An example is shown for the special case of d = 0. Video encoder 200 or video decoder 300 can apply PDPC using, for example, samples 154 and 156 of neighboring block 158 to predict sample 152, as discussed in more detail below. Gradient PDPC can be applied for case 1 for (x < (3 « nScale2)) and for case 2 for (y < (3 « nScale2)), and for all blocks, the value of nScale2 >= 0, so PDPC can be applied for all such blocks (at least partially, for some rows / columns). Furthermore, the application of PDPC (range) can depend on nScale2. A higher nScale2 value can indicate that PDPC can be applied for a larger number of rows / columns.

[0095] In some examples, video encoder 200 and video decoder 300 can apply gradient PDPC to blocks for which nScale < 0, or equivalently, to blocks for which the initial PDPC method of VVC cannot be applied. The corresponding specification changes for JVET-P2001-vE are shown below, where “[add: “added text”] indicates additions relative to JVET-P2001-vE:

[0096] 3.1.1.1 3.1.1.1.1 Position-dependent intra prediction sample filtering process

[0097] The inputs to this process are:

[0098] - the intra prediction mode predModeIntra,

[0099] - the variable nTbW specifying the transform block width,

[0100] - the variable nTbH specifying the transform block height,

[0101] - the variable refW specifying the reference sample width,

[0102] - the variable refH specifying the reference sample height,

[0103] - the predicted samples predSamples[x][y] with

[0104] x = 0..nTbW - 1, y = 0..nTbH - 1,

[0105] - the neighboring samples p[x][y] with

[0106] x = -1, y = -1..refH - 1 and x = 0..refW - 1, y = -1.

[0107] The output of this process are the modified predicted samples predSamples[x][y] with

[0108] x = 0..nTbW - 1, y = 0..nTbH - 1.

[0109] The variable nScale is derived as follows:

[0110] - If predModeIntra is greater than INTRA_ANGULAR50, nScale is set to Min(2, Log2(nTbH) - Floor(Log2(3*invAngle - 2)) + 8) using invAngle as specified in clause 8.4.5.2.12.

[0111] - Else if predModeIntra is less than INTRA_ANGULAR18, not equal to INTRA_PLANAR and not equal to INTRA_DC, nScale is set to Min(2, Log2(nTbW) - Floor(Log2(3*invAngle - 2)) + 8) using invAngle as specified in clause 8.4.5.2.12.

[0112] [Added: "The variable nScale2 is set to ((Log2(nTbW) + Log2(nTbH) - 2) » 2)."]

[0113] The reference sample arrays mainRef[x] and sideRef[y], with x = 0..refW - 1 and y = 0..refH - 1, are derived as follows:

[0114] mainRef[x] = p[x][-1] (424)

[0115] sideRef[y] = p[-1][y]

[0116] The variables refL[x][y], refT[x][y], wT[y] and wL[x], with x = 0..nTbW - 1 and y = 0..nTbH - 1, are derived as follows:

[0117] - If predModeIntra is equal to INTRA_PLANAR or INTRA_DC, the following conditions apply:

[0118] refL[x][y] = p[-1][y] (425)

[0119] refT[x][y] = p[x][-1] (426)

[0120]

[0121] ​wT[y] = 32 » ((y « 1) » [add: "nScale2"]) (427)

[0122] wL[x] = 32 » ((x « 1) » [add: "nScale2"]) (428)

[0123] - Otherwise, if predModeIntra is equal to INTRA_ANGULAR18 or INTRA_ANGULAR50 [add: "or nScale is less than 0"], the following conditions apply:

[0124] [add: "The variable tempSample is derived using iIdx and iFact as specified in clause 8.4.5.2.12, as follows:

[0125] if predModeIntra is less than or equal to INTRA_ANGULAR18,

[0126] tempSample = ((32 - iFact) * p[-1][iIdx - 1] + iFact * p[-1][iIdx] + 16) » 5

[0127] else,

[0128] tempSample = ((32 - iFact) * p[iIdx - 1][-1] + iFact * p[iIdx][-1] + 16) » 5

[0129] refL[x][y] = p[-1][y] - tempSample + predSamples[x][y] (429)

[0130] refT[x][y] = p[x][-1] - tempSample + predSamples[x][y] (430)

[0131] wT[y] = (predModeIntra [add: "<="] INTRA_ANGULAR18)?

[0132] 32 » ((y « 1) » [add: "nScale2"]) : 0 (431)

[0133] wL[x] = (predModeIntra [add: ">="] INTRA_ANGULAR50)?

[0134] 32 » ((x « 1) » [add: "nScale2"]) : 0 (432)

[0135] - Otherwise, if predModeIntra is less than INTRA_ANGULAR18, the following ordered steps apply:

[0136] 1. Variables dXInt[ y ] and dX[ x ][ y ] are derived depending on intraPredMode, using invAngle as specified in clause 8.4.5.2.12, as follows:

[0137] dXInt[ y ] = ( ( y + 1 ) * invAngle + 256 ) » 9 (433)

[0138] dX[ x ][ y ] = x + dXInt[ y ]

[0139] 2. Variables refL[ x ][ y ], refT[ x ][ y ], wT[ y ], and wL[ x ] are derived as follows:

[0140] refL[ x ][ y ] = 0 (434)

[0141] refT[ x ][ y ] = ( y < ( 3 « nScale ) )? mainRef[ dX[ x ][ y ] ] : 0 (435)

[0142] wT[ y ] = 32 » ( ( y « 1 ) » nScale ) (436)

[0143] wL[ x ] = 0 (437)

[0144] - Otherwise, if predModeIntra is greater than INTRA_ANGULAR50, the following ordered steps apply:

[0145] 1. Variables dYInt[ x ] and dY[ x ][ y ] are derived depending on intraPredMode, using invAngle as specified in clause 8.4.5.2.12, as follows:

[0146] dYInt[ x ] = ( ( x + 1 ) * invAngle + 256 ) » 9 (8-243)

[0147] dY[ x ][ y ] = y + dYInt[ x ]

[0148] 2. Variables refL[ x ][ y ], refT[ x ][ y ], wT[ y ], and wL[ x ] are derived as follows:

[0149] refL[ x ][ y ] = ( x < ( 3 « nScale ) )? sideRef[ dY[ x ][ y ] ] : 0 (439)

[0150] refT[x][y] = 0 (440)

[0151] wT[y] = 0 (441)

[0152] wL[x] = 32 » ((x « 1) » nScale) (442)

[0153] - Otherwise, refL[x][y], refT[x][y], wT[y] and wL[x] are all set to 0.

[0154] The value of the modified predicted sample predSamples[x][y], where x = 0..nTbW - 1, y = 0..nTbH - 1, is derived as follows:

[0155] predSamples[x][y] = Clipl((refL[x][y] * wL[x] + refT[x][y] * wT[y] + (64 - wL[x] - wT[y]) * predSamples[x][y] + 32) » 6) (443)

[0156] In some examples, video encoder 200 and video decoder 300 can apply the gradient PDPC described above only to near-horizontal and near-vertical modes, e.g., modes 18 - k1 and 50 + k2, where 0 < k1 <= TH1 and 0 < k2 <= TH2. The thresholds (TH1, TH2) can be fixed or dependent on block size, quantization parameter, and / or other block parameters. TH1 and TH2 can also be specified at picture level (e.g., in a picture header or a picture parameter set (PPS)) or sequence level parameters (e.g., in a sequence parameter set (SPS)). That is, video encoder 200 can encode data representative of TH1 and TH2 in, for example, a VPS, SPS, PPS, picture header, slice header, block header, etc., and video decoder 300 can decode the data to determine TH1 and TH2, and likewise, k1 and k2.

[0157] Video encoder 200 and video decoder 300 can be configured to code a flag (e.g., a sequence level flag in SPS or a picture level flag in PPS) to enable / disable the gradient PDPC. For example, video encoder 200 can perform rate-distortion optimization (RDO) to determine whether the gradient PDPC reduces distortion without excessively increasing bit rate, and if so, can enable the gradient PDPC. Additionally or alternatively, video encoder 200 can enable the gradient PDPC only for certain profiles, tiers, and / or levels of a relevant video coding standard.

[0158] In some examples, the video encoder 200 and the video decoder 300 may apply gradient PDPC to blocks where nScale < nScale2, or to blocks where gradient PDPC will be applied to more regions compared to the initial PDPC.

[0159] In some examples, for case 1, when nScale < nScale2, the video encoder 200 and the video decoder 300 may apply the initial PDPC to (x < (3 << nScale)), and apply the gradient PDPC to ((3 << nScale) <= x < ((3 << nScale2)). Similarly, for case 2, the video encoder 200 and the video decoder 300 may apply the initial PDPC to (y < (3 << nScale)), and apply the gradient PDPC to ((3 << nScale) <= y < ((3 << nScale2)). In these examples, the motivation is to use "gradient PDPC" for rows or columns without applying the initial PDPC.

[0160] In some examples, the video encoder 200 and the video decoder 300 may combine the results of the conventional PDPC and the gradient PDPC, for example, in a weighted manner, where both the conventional PDPC and the gradient PDPC may be applied.

[0161] In some examples, the video encoder 200 and the video decoder 300 may apply the gradient PDPC in an angular mode to the luminance component, but not to the chrominance component.

[0162] In some examples, for the angular mode of narrow chrominance blocks (e.g., Nx2 or 2xN chrominance blocks), the gradient PDPC may be disabled (or not applied). For example, the video encoder 200 and the video decoder 300 may determine that the chrominance block is narrow (e.g., Nx2 or 2xN), and based on the determination that the chrominance block is narrow, not apply the gradient PDPC in the angular mode to the narrow block.

[0163] The video encoder 200 and the video decoder 300 may apply any or all of the above techniques individually or in combination.

[0164] Figure 8 is a block diagram showing an example video encoder 200 that may perform the techniques of the present disclosure. Figure 8 is provided for purposes of explanation and should not be considered a limitation of the techniques broadly illustrated and described in the present disclosure. For purposes of explanation, the present disclosure describes the video encoder 200 in the context of video coding and decoding standards such as the HEVC video coding and decoding standard and the H.266 video coding and decoding standard under development. However, the techniques of the present disclosure are not limited to these video coding and decoding standards and are generally applicable to video encoding and decoding.

[0165] exist Figure 8 In the example of FIG, 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 may be implemented in one or more processors or in processing circuitry. Furthermore, the video encoder 200 may include additional or alternative processors or processing circuitry to perform these and other functions.

[0166] 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 5 ) receives video data stored in the video data memory 230. DPB218 can act as a reference picture memory, which stores reference video data for use by the video encoder 200 when predicting subsequent video data. The video data memory 230 and DPB 218 can be formed by any of a variety of memory devices (such as dynamic random access memory (DRAM), including synchronous DRAM (SDRAM), magnetoresistive RAM (MRAM), resistive RAM (RRAM) or other types of memory devices). The video data memory 230 and DPB218 can be provided by the same memory device or a separate memory device. In various examples, the video data memory 230 can be on the chip with other components of the video encoder 200 (as shown in the figure), or off the chip relative to those components.

[0167] In this disclosure, references to the video data memory 230 should not be construed as limited to memory internal to the video encoder 200 (unless explicitly stated) or memory external to the video encoder 200 (unless explicitly stated). 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 5 The memory 106 may also provide temporary storage for outputs from the various units of the video encoder 200 .

[0168] Figure 8The illustrated components of the video encoder 200 facilitate understanding of the operations performed by the video encoder 200. The components can be implemented as fixed- function circuits, programmable circuits, or a combination thereof. Fixed-function circuits refer to circuits that provide particular functionality, and are preset in the operations that can be performed. Programmable circuits refer to circuits that can be programmed to perform various tasks, and provide flexible functionality in the operations that can be performed. For instance, programmable circuits can execute software or firmware that cause the programmable circuits to operate in the manner defined by instructions of the software or firmware. Fixed-function circuits can execute software instructions (e.g., to receive parameters or output parameters), but the types of operations that the fixed-function circuits perform are generally immutable. In some examples, one or more of the components can be distinct circuit blocks (fixed-function or programmable), and in some examples, one or more components can be integrated circuits.

[0169] The video encoder 200 can include arithmetic logic units (ALUs), elementary function units (EFUs), digital circuits, analog circuits, and / or programmable cores formed from programmable circuits. In examples where the operations of the video encoder 200 are performed using software executed by the programmable circuits, the memory 106 Figure 5 ) can store object code of the software that the video encoder 200 receives and executes, or another memory within the video encoder 200 (not shown) can store such instructions.

[0170] The video data memory 230 is configured to store video data that is received. The video encoder 200 can retrieve the 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 can be original video data that is to be encoded.

[0171] The mode selection unit 202 includes a motion estimation unit 222, a motion compensation unit 224, and an intra-prediction unit 226. The mode selection unit 202 can include additional functional units to perform video prediction according to other prediction modes. As examples, the mode selection unit 202 can include a palette unit, a block copy unit (which can be part of the motion estimation unit 222 and / or the motion compensation unit 224), an affine unit, a linear model (LM) unit, etc.

[0172] The mode selection unit 202 generally coordinates multiple encoding passes to test combinations of encoding parameters and final rate-distortion values for those combinations. The encoding parameters can include partitioning of CTUs into CUs, prediction modes for the CUs, transform types for residual data of the CUs, quantization parameters for the residual data of the CUs, etc. The mode selection unit 202 can ultimately select the combination of encoding parameters that has the better rate-distortion value than the other tested combinations.

[0173] Video encoder 200 can partition a picture retrieved from video data memory 230 into a series of CTUs and encapsulate one or more CTUs within a slice. Mode select unit 202 can partition a CTU of a picture according to a tree structure such as the QTBT structure described above or the quad-tree structure of HEVC. As described above, video encoder 200 can form one or more CUs from partitioning a CTU according to the tree structure. Such CUs can also be referred to generally as “video blocks” or “blocks.”

[0174] In general, mode select unit 202 also controls its components (e.g., motion estimation unit 222, motion compensation unit 224, and intra-prediction unit 226) to generate a prediction block for a current block (e.g., a current CU, or an overlapping portion of a PU and a TU in HEVC). For inter-prediction of a current block, motion estimation unit 222 can 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 encoded pictures stored in DPB 218). Specifically, motion estimation unit 222 can calculate a value that represents how similar a potential reference block is to the current block, e.g., according to a sum of absolute difference (SAD), a sum of squared difference (SSD), a mean absolute difference (MAD), a mean squared difference (MSD), etc. Motion estimation unit 222 can generally perform these calculations using a sample-by-sample difference between the current block and the reference block being considered. Motion estimation unit 222 can identify the reference block with the lowest value according to these calculations, indicating the reference block that most closely matches the current block.

[0175] Motion estimation unit 222 can form one or more motion vectors (MVs) that define a position of a reference block in a reference picture relative to a position of the current block in the current picture. Motion estimation unit 222 can then provide the motion vector(s) to motion compensation unit 224. For example, for uni-directional inter-prediction, motion estimation unit 222 can provide a single motion vector, while for bi-directional inter-prediction, motion estimation unit 222 can provide two motion vectors. Motion compensation unit 224 can then use the motion vector(s) to generate the prediction block. For example, motion compensation unit 224 can use the motion vector(s) to retrieve data for the reference block. As another example, if the motion vector has fractional sample precision, motion compensation unit 224 can interpolate values for the prediction block according to one or more interpolation filters. Moreover, for bi-directional inter-prediction, motion compensation unit 224 can retrieve data for two reference blocks identified by the respective motion vectors and combine the retrieved data, e.g., by a sample-wise average or weighted average.

[0176] As another example, for intra prediction or intra prediction coding, the intra prediction unit 226 can generate a prediction block from samples neighboring the current block. For example, for directional modes, the intra prediction unit 226 can mathematically combine values of the neighboring samples and fill these computed values in a defined direction across the current block to produce the prediction block. As another example, for a DC mode, the intra prediction unit 226 can compute an average of the neighboring samples of the current block and generate a prediction block that includes the average for each sample of the prediction block.

[0177] The intra prediction unit 226 can also perform the gradient PDPC technique of the present disclosure. The intra prediction unit 226 can initially form a prediction block for the current block using an angular intra prediction mode. The intra prediction unit 226 can also determine that the angular intra prediction mode is a mode between 50 and 81 or less than 18 and not 1 and 0. In response, the intra prediction unit 226 can perform gradient PDPC.

[0178] In particular, as described above, the intra prediction unit 226 can determine a prediction direction for the angular intra prediction mode. The intra prediction unit 226 can compute a gradient term for samples of the current block along the prediction direction. For example, the intra prediction unit 226 can compute a change in intensity along the prediction direction, as discussed above, e.g., relative to Figure 6 The intra prediction unit 226 can then combine the gradient term with a predicted value for the sample to form a final value for the sample. The intra prediction unit 226 can perform these techniques for multiple samples (e.g., all samples or fewer than all samples) of the prediction block.

[0179] In some examples, when combining the gradient term with the predicted value, the intra prediction unit 226 can weight the gradient term and the predicted value, e.g., using weights that sum to 1 for the combination. The intra prediction unit 226 can determine the weights based on, e.g., a distance between a location of the sample and a corresponding primary boundary (i.e., the boundary from which the predicted value was computed). For example, when the intra prediction mode is a top-right angular intra prediction mode, the intra prediction unit 226 can determine weights to apply to the intra predicted sample as a function of a distance between the location of the sample and a horizontally neighboring reference sample. As another example, when the intra prediction mode is a bottom-right angular intra prediction mode, the intra prediction unit 226 can determine weights to apply to the intra predicted sample as a function of a distance between the location of the sample and a vertically neighboring reference sample.

[0180] In some examples, intra prediction unit 226 can determine whether to apply gradient PDPC to the current block based on other factors in addition to the angle intra prediction direction used. For example, mode selection unit 202 can perform multiple encoding passes, comparing the use of gradient PDPC and the non-use of gradient PDPC for one or more blocks (e.g., multiple blocks in a slice, multiple slices, multiple pictures, etc.). Mode selection unit 202 can calculate rate-distortion optimization (RDO) values for each encoding pass, and determine whether to enable gradient PDPC based on whether the RDO value when gradient PDPC is enabled is better than the RDO value when gradient PDPC is disabled.

[0181] In some examples (in addition to or as an alternative to the above), as described above, intra prediction unit 226 can calculate the nScale and nScale2 values for the current block, and use these values to determine whether to apply gradient PDPC. For example, intra prediction unit 226 can be configured to apply gradient PDPC to all blocks for which nScale2 is greater than or equal to zero. As another example, when nScale is less than nScale2, intra prediction unit 226 can determine to apply gradient PDPC. Additionally or alternatively, intra prediction unit 226 can be configured to apply gradient PDPC only to luma blocks, and not to chroma blocks. Additionally or alternatively, intra prediction unit 226 can be configured to apply gradient PDPC only to blocks larger than 4x4.

[0182] In some examples, mode selection unit 202 can also encode explicit data indicating whether gradient PDPC is enabled. For example, mode selection unit 202 can form a VPS, SPS, PPS, picture header, slice header, block header, etc. that includes data indicating whether gradient PDPC is enabled. Mode selection unit 202 can provide such a data structure to entropy encoding unit 220 for encoding as part of the bitstream.

[0183] Mode selection unit 202 provides the prediction block to residual generation unit 204. Residual generation unit 204 receives the original, uncoded version of the current block from video data store 230, and the prediction block from mode selection unit 202. Residual generation unit 204 calculates the sample-by-sample difference between the current block and the prediction block. The resulting sample-by-sample difference defines a residual block for the current block. In some examples, residual generation unit 204 can also determine the difference between sample values in the residual block to generate the residual block using residual differential pulse code modulation (RDPCM). In some examples, residual generation unit 204 can be formed using one or more subtractor circuits that perform binary subtraction.

[0184] In examples where the mode selection unit 202 partitions the CU into PUs, each PU can be associated with a luma prediction unit and corresponding chroma prediction units. The video encoder 200 and the video decoder 300 can support PUs having various sizes. As described above, the size of the CU can refer to the size of the luma coding block of the CU, and the size of the PU can refer to the size of the luma prediction unit of the PU. Assuming that a particular CU has a size of 2Nx2N, the video encoder 200 can support PU sizes of 2Nx2N or NxN for intra prediction, and 2Nx2N, 2NxN, Nx2N, NxN, or similar symmetric PU sizes for inter prediction. The video encoder 200 and the video decoder 300 can also support non-symmetric partitioning for PU sizes of 2NxnU, 2NxnD, nLx2N, and nRx2N for inter prediction.

[0185] In examples where the mode selection unit 202 does not further partition the CU into PUs, each CU can be associated with a luma coding block and corresponding chroma coding blocks. As described above, the size of the CU can refer to the size of the luma coding block of the CU. The video encoder 200 and the video decoder 300 can support CU sizes of 2Nx2N, 2NxN, or Nx2N.

[0186] For other video coding techniques, such as intra block copy mode coding, affine mode coding, and linear model (LM) mode coding, as some examples, the mode selection unit 202 generates, via respective units associated with the coding techniques, a prediction block for the current block being coded. In some examples, such as palette mode coding, the mode selection unit 202 can not generate a prediction block, but rather generate syntax elements indicative of a manner in which the block is to be reconstructed based on a selected palette. In such modes, the mode selection unit 202 can provide the syntax elements to the entropy encoding unit 220 for encoding.

[0187] As described above, the residual generation unit 204 receives video data of the current block and the 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 a sample-by-sample difference between the prediction block and the current block.

[0188] Transform processing unit 206 applies one or more transforms to the residual block to produce a block of transform coefficients (referred to herein as a "transform coefficient block"). Transform processing unit 206 can apply various transforms to the residual block to form the transform coefficient block. For example, transform processing unit 206 can apply a discrete cosine transform (DCT), a directional transform, a Karhunen-Loeve transform (KLT), or a conceptually similar transform. In some examples, transform processing unit 206 can perform multiple transforms, e.g., a primary transform and a secondary transform such as a rotation transform, on the residual block. In some examples, transform processing unit 206 does not apply a transform to the residual block.

[0189] Quantization unit 208 can quantize the transform coefficients in a transform coefficient block, to produce a quantized transform coefficient block. Quantization unit 208 can quantize transform coefficients of a transform coefficient block according to a quantization parameter (QP) value associated with the current block. Video encoder 200 (e.g., via mode select unit 202) can adjust the degree of quantization applied to the transform coefficient blocks associated with the current block by adjusting the QP value associated with the CU. Quantization can introduce loss of information, and thus, quantized transform coefficients can have lower precision than the original transform coefficients produced by transform processing unit 206.

[0190] Inverse quantization unit 210 and inverse transform processing unit 212 can apply inverse quantization and inverse transforms, respectively, to a quantized transform coefficient block to reconstruct a residual block from the transform coefficient block. Reconstruction unit 214 can produce a reconstructed block corresponding to the current block (albeit with some degree of distortion) based on the reconstructed residual block and the prediction block generated by mode select unit 202. For example, reconstruction unit 214 can add samples of the reconstructed residual block to corresponding samples from the prediction block generated by mode select unit 202 to produce the reconstructed block.

[0191] Filter unit 216 can perform one or more filtering operations on the reconstructed block. For example, filter unit 216 can perform a deblocking operation to reduce blocking artifacts along the edges of the CU. In some examples, the operations of filter unit 216 can be skipped.

[0192] Video encoder 200 stores the reconstructed blocks in DPB 218. For instance, in examples where the operations of filter unit 216 are not needed, reconstructed unit 214 can store the reconstructed blocks to DPB 218. In examples where the operations of filter unit 216 are needed, filter unit 216 can store the filtered reconstructed blocks to DPB 218. Motion estimation unit 222 and motion compensation unit 224 can retrieve reference pictures formed from the reconstructed (and potentially filtered) blocks in DPB 218 to inter-predict blocks of subsequent encoded pictures. In addition, intra-prediction unit 226 can use the reconstructed blocks in DPB 218 of the current picture to intra-predict other blocks in the current picture.

[0193] In general, entropy encoding unit 220 can entropy encode syntax elements received from other functional components of video encoder 200. For example, entropy encoding unit 220 can entropy encode quantized transform coefficient blocks from quantization unit 208. As another example, entropy encoding unit 220 can entropy encode prediction syntax elements (e.g., motion information for inter-prediction or intra-mode information for intra-prediction) from mode select unit 202. Entropy encoding unit 220 can perform one or more entropy encoding operations on syntax elements, as another example of video data, to generate entropy encoded data. For example, entropy encoding unit 220 can 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 other types of entropy coding operations on the data. In some examples, entropy encoding unit 220 can operate in a bypass mode in which no entropy coding is performed on the syntax elements.

[0194] Video encoder 200 can output a bitstream that includes the entropy encoded syntax elements needed to reconstruct the blocks of a slice or picture. In particular, entropy encoding unit 220 can output the bitstream.

[0195] The operations described above are described in terms of blocks. This description should be understood to be operations on luma coding blocks and / or chroma coding blocks. As described above, in some examples, the luma coding blocks and chroma coding blocks are luma components and chroma components of CUs. In some examples, the luma coding blocks and chroma coding blocks are luma components and chroma components of PUs.

[0196] In some examples, operations performed for luma coded blocks need not be repeated for chroma coded blocks. As one example, operations to identify a motion vector (MV) and a reference picture for a luma coded block need not be repeated to identify an MV and a reference picture for a chroma block. Instead, the MV for the luma coded block can be scaled to determine the MV for the chroma block, and the reference picture can be the same. As another example, the intra prediction process can be the same for luma and chroma coded blocks.

[0197] Video encoder 200 represents an example of a device for encoding and decoding video data, including a memory configured to store video data; and one or more processors implemented in circuitry, the one or more processors configured to: generate, using an angular intra prediction mode, an intra prediction block for a current block of video data, the angular intra prediction mode being a right-up angular intra prediction mode or a left-down angular intra prediction mode; determine a prediction direction of the angular intra prediction mode; for at least one sample of the prediction block of the current block: calculate a gradient term for the sample along the prediction direction; and combine a value of an intra predicted sample of the intra prediction block at a location of the sample of the prediction block with the gradient term to produce a value of the sample of the prediction block; and decode the current block using the prediction block.

[0198] Figure 9 FIG. 3 is a block diagram illustrating an example video decoder 300 that can perform the techniques of this disclosure. Figure 9 FIG. 3 is provided for purposes of explanation and is not limiting on the techniques as broadly exemplified and described in this disclosure. For purposes of explanation, this disclosure describes a video decoder 300 according to the techniques of JEM, VVC, and HEVC. However, the techniques of this disclosure can be performed by video coding devices configured to be compliant with other video coding standards.

[0199] In Figure 9 In the example of FIG. 3, video decoder 300 includes coded picture buffer (CPB) memory 320, entropy decoding unit 302, prediction processing unit 304, inverse quantization unit 306, inverse transform processing unit 308, reconstruction unit 310, filter unit 312, and decoded picture buffer (DPB) 314. Any or all of CPB memory 320, entropy decoding unit 302, prediction processing unit 304, inverse quantization unit 306, inverse transform processing unit 308, reconstruction unit 310, filter unit 312, and DPB 314 can be implemented in one or more processors or in processing circuitry. Moreover, video decoder 300 can include additional or alternative processors or processing circuitry to perform these and other functions.

[0200] The prediction processing unit 304 includes a motion compensation unit 316 and an intra-prediction unit 318. The prediction processing unit 304 can include additional units to perform prediction according to other prediction modes. As examples, the prediction processing unit 304 can include a palette unit, a block copy unit (which can form a part of the motion compensation unit 316), an affine unit, a linear model (LM) unit, etc. In other examples, the video decoder 300 can include more, fewer, or different functional components.

[0201] The CPB memory 320 can store video data, such as encoded video bitstreams, to be decoded by the components of the video decoder 300. The video data stored in the CPB memory 320 can be obtained, for example, from the computer- readable medium 110 Figure 5 The CPB memory 320 can include a CPB that stores encoded video data (e.g., syntax elements) from an encoded video bitstream. Also, the CPB memory 320 can store video data other than syntax elements of coded pictures, such as temporary data representing outputs from the various units of the video decoder 300. The DPB 314 generally stores decoded pictures that 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 DPB 314 can be formed by any of a variety of memory devices, such as dynamic random access memory (DRAM), including synchronous DRAM (SDRAM), magneto resistive RAM (MRAM), resistive RAM (RRAM), or other types of memory devices. The CPB memory 320 and the DPB 314 can be provided by the same memory device or separate memory devices. In various examples, the CPB memory 320 can be on-chip with other components of the video decoder 300, or off-chip relative to those components.

[0202] Additionally or alternatively, in some examples, the video decoder 300 can retrieve the encoded video data from the memory 120 Figure 5 That is, the memory 120 can store data as discussed above with respect to the CPB memory 320. Likewise, when some or all of the functionality of the video decoder 300 is implemented in software executed by the processing circuitry of the video decoder 300, the memory 120 can store the instructions executed by the video decoder 300.

[0203] Figure 9 The various units shown help to understand the operations performed by the video decoder 300. The units can be implemented as fixed- function circuits, programmable circuits, or a combination thereof. Similar to the video encoder 200, the video decoder 300 can include additional details shown or fewer details. Figure 8Fixed function circuits refer to circuits that provide specific functionality, and are preset in terms of operations that can be performed. Programmable circuits refer to circuits that can be programmed to perform various tasks, and provide flexible functionality in terms of operations that can be performed. For instance, programmable circuits can execute software or firmware that cause the programmable circuits to operate in a manner defined by instructions of the software or firmware. Fixed function circuits can execute software instructions (e.g., receive parameters or output parameters), but the types of operations that the fixed function circuits execute are generally immutable. In some examples, one or more units can be distinct circuit blocks (fixed function or programmable), and in some examples, one or more units can be an integrated circuit.

[0204] Video decoder 300 can include ALUs, EFUs, digital circuits, analog circuits, and / or programmable cores formed from programmable circuits. In examples where the operations of video decoder 300 are performed by software executing on the programmable circuits, on-chip or off-chip memory can store instructions (e.g., object code) of the software that video decoder 300 receives and executes.

[0205] Entropy decoding unit 302 can receive encoded video data from a CPB and entropy decode the video data to reconstruct syntax elements. Prediction processing unit 304, inverse quantization unit 306, inverse transform processing unit 308, reconstruction unit 310, and filter unit 312 can generate decoded video data based on the syntax elements extracted from the bitstream.

[0206] In general, video decoder 300 reconstructs pictures on a block-by-block basis. Video decoder 300 can perform reconstruction operations individually on each block (where the block that is currently being reconstructed (i.e., decoded) can be referred to as the “current block”).

[0207] Entropy decoding unit 302 can entropy decode syntax elements defining a block of quantized transform coefficients, as well as transform information such as a quantization parameter (QP) and / or an indication of a transform mode. Inverse quantization unit 306 can use the QP associated with the block of quantized transform coefficients to determine a degree of quantization, and likewise a degree of inverse quantization for inverse quantization unit 306 to apply. Inverse quantization unit 306 may, for example, perform a bit- shift operation to inverse quantize the quantized transform coefficients. Inverse quantization unit 306 can thereby form a block of transform coefficients including transform coefficients.

[0208] After inverse quantization unit 306 forms a transform coefficient block, inverse transform processing unit 308 can apply one or more inverse transforms to the transform coefficient block to generate a residual block associated with the current block. For example, inverse transform processing unit 308 can apply an inverse DCT, an inverse integer transform, an inverse Karhunen-Loeve Transform (KLT), an inverse rotational transform, an inverse directional transform, or another inverse transform to the transform coefficient block.

[0209] Furthermore, prediction processing unit 304 generates a prediction block from the prediction information syntax elements entropy decoded by entropy decoding unit 302. For example, if the prediction information syntax elements indicate that the current block is inter predicted, motion compensation unit 316 can generate the prediction block. In this case, the prediction information syntax elements can indicate a reference picture in DPB 314 from which to retrieve the reference block, and a motion vector identifying a position of the reference block in the reference picture relative to a position of the current block in the current picture. Motion compensation unit 316 can generally perform the inter prediction process in a manner substantially similar to that described with respect to motion compensation unit 224 Figure 8 ) described above.

[0210] As another example, if the prediction information syntax elements indicate that the current block is intra predicted, intra prediction unit 318 can generate the prediction block according to an intra prediction mode indicated by the prediction information syntax elements. Furthermore, intra prediction unit 318 can generally perform the intra prediction process in a manner substantially similar to that described with respect to intra prediction unit 226 Figure 8 ) described above. Intra prediction unit 318 can perform the gradient PDPC techniques of this disclosure. Intra prediction unit 318 can retrieve data for neighboring samples of the current block from DPB 314.

[0211] In some examples, entropy decoding unit 302 can decode explicit data indicating whether gradient PDPC is enabled. For example, entropy decoding unit 302 can decode a VPS, an SPS, a PPS, a picture header, a slice header, a block header, etc. that includes data indicating whether gradient PDPC is enabled. Entropy decoding unit 302 can provide the decoded data to intra prediction unit 318 indicating whether gradient PDPC is enabled for a particular picture sequence, picture, slice, block, etc.

[0212] Intra prediction unit 318 can perform the gradient PDPC techniques of this disclosure. Intra prediction unit 318 can initially form a prediction block for the current block using an angular intra prediction mode. Intra prediction unit 318 can also determine that the angular intra prediction mode is a mode between 50 and 81 or less than 18 and not 1 and 0. In response, intra prediction unit 318 can perform gradient PDPC.

[0213] In particular, as described above, intra prediction unit 318 can determine a prediction direction for an angular intra prediction mode. Intra prediction unit 318 can calculate a gradient term for samples of the current block along the prediction direction. For example, intra prediction unit 318 can calculate a strength of change along the prediction direction, as discussed above, e.g., relative to Figure 6 Intra prediction unit 318 can then combine the gradient term with the predicted value of the sample to form a final value for the sample. Intra prediction unit 318 can perform these techniques for multiple samples (e.g., all samples or fewer than all samples) of the prediction block.

[0214] In some examples, when combining the gradient term with the predicted value, intra prediction unit 318 can weight the gradient term and the predicted value, e.g., using weights that sum to one. Intra prediction unit 318 can determine the weights based on, e.g., a distance between the location of the sample and the corresponding primary boundary (i.e., the boundary from which the predicted value was calculated). For example, when the intra prediction mode is a top-right angular intra prediction mode, intra prediction unit 318 can determine weights to apply to the intra-predicted samples as a function of a distance between the location of the sample and a horizontally neighboring reference sample. As another example, when the intra prediction mode is a bottom-right angular intra prediction mode, intra prediction unit 318 can determine weights to apply to the intra-predicted samples as a function of a distance between the location of the sample and a vertically neighboring reference sample.

[0215] In some examples, intra prediction unit 318 can determine whether to apply gradient PDPC to the current block based on other factors in addition to the angular intra prediction direction used. As described above, intra prediction unit 318 can receive data from entropy decoding unit 302 indicating whether gradient PDPC is enabled.

[0216] In some examples, in addition to or as an alternative to the above, as described above, intra prediction unit 318 can calculate nScale and nScale2 values for the current block and use these values to determine whether to apply gradient PDPC. For example, intra prediction unit 318 can be configured to apply gradient PDPC to all blocks for which nScale2 is greater than or equal to zero. As another example, when nScale is less than nScale2, intra prediction unit 318 can determine to apply gradient PDPC. Additionally or alternatively, intra prediction unit 318 can be configured to apply gradient PDPC only to luma blocks and not to chroma blocks. Additionally or alternatively, intra prediction unit 318 can be configured to apply gradient PDPC only to blocks larger than 4x4.

[0217] The reconstruction unit 310 can reconstruct the current block using the prediction block and the residual block. For example, the reconstruction unit 310 can add samples of the residual block to corresponding samples of the prediction block to reconstruct the current block.

[0218] The filter unit 312 can perform one or more filtering operations on the reconstructed block. For example, the filter unit 312 can perform a deblocking operation to reduce blocking artifacts along edges of the reconstructed block. The operations of the filter unit 312 are not necessarily performed in all examples.

[0219] The video decoder 300 can store the reconstructed block in the DPB 314. As discussed above, the DPB 314 can provide reference information, such as samples of a current picture for intra prediction and previously decoded pictures for subsequent motion compensation, to the prediction processing unit 304. In addition, the video decoder 300 can output decoded pictures from the DPB 314 for subsequent presentation on a display device, such as display device 118, Figure 1 .

[0220] In this manner, the video decoder 300 represents one example of a device for decoding video data, including a memory configured to store video data; and one or more processors implemented in circuitry, the one or more processors configured to: generate, using an angular intra prediction mode, an intra prediction block for a current block of video data, the angular intra prediction mode being a top-right angular intra prediction mode or a bottom-left angular intra prediction mode; determine a prediction direction for the angular intra prediction mode; for at least one sample of the prediction block of the current block: calculate a gradient term for the sample along the prediction direction; and combine a value of an intra predicted sample of the intra prediction block at a location of the sample of the prediction block with the gradient term to produce a value of the sample of the prediction block; and decode the current block using the prediction block.

[0221] Figure 10 is a flowchart illustrating an example method of encoding a current block in accordance with the techniques of this disclosure. The current block can include a current CU. Although described with respect to video encoder 200, Figure 5 and Figure 8 , it should be understood that other devices can be configured to perform similar methods as Figure 10 .

[0222] In this example, video encoder 200 initially predicts the current block (350). For example, video encoder 200 can form a prediction block for the current block. In particular, video encoder 200 can use the gradient PDPC techniques of this disclosure to form the prediction block. For example, video encoder 200 can determine a direction for an angular intra prediction mode for the current block. Then, for at least one sample (potentially multiple or all samples) of the current block, video encoder 200 can compute a gradient term for it along the prediction direction and combine the prediction value with the corresponding gradient term to ultimately form a final prediction block for the current block.

[0223] Video encoder 200 can then compute a residual block for the current block (352). To compute the residual block, video encoder 200 can compute a difference between the initial unencoded block and the prediction block for the current block. Video encoder 200 can then transform and quantize coefficients of the residual block (354). Next, video encoder 200 can scan the quantized transform coefficients of the residual block (356). During or after the scan, video encoder 200 can entropy encode the coefficients (358). For example, video encoder 200 can encode the coefficients using CAVLC or CABAC. Video encoder 200 can then output the entropy encoded data for the block (360).

[0224] After encoding the current block, video encoder 200 can also decode the current block. As described above, video encoder 200 includes video decoding components, sometimes referred to as a decoding loop. These decoding components include inverse quantization unit 210, inverse transform processing unit 212, reconstruction unit 214, filter unit 216, and DPB 218 Figure 8 ). Thus, after encoding the current block, inverse quantization unit 210 and inverse transform processing unit 212 can inverse quantize and inverse transform the quantized transform coefficients to reproduce the residual block (362). Reconstruction unit 214 can then combine (on a sample-by-sample basis) the residual block and the prediction block to decode the current block (364). Video encoder 200 can then store the decoded block in DPB 218 (366). In some examples, filter unit 216 can filter the decoded block before it is stored in DPB 218. In this way, video encoder 200 can encode and decode the current block such that the reference blocks stored in DPB 218 are identical to the decoded reference blocks that are reconstructed by a video decoder (e.g., video decoder 300).

[0225] In this way, Figure 10The method of represents an example of a method of encoding and decoding video data, including generating an intra prediction block for a current block of video data using an angular intra prediction mode, the angular intra prediction mode being a top-right angular intra prediction mode or a bottom-left angular intra prediction mode; determining a prediction direction for the angular intra prediction mode; for at least one sample of the prediction block for the current block: calculating a gradient term for the sample along the prediction direction; and combining a value of an intra predicted sample of the intra prediction block at a location of the sample of the prediction block with the gradient term to produce a value of the sample of the prediction block; and decoding the current block using the prediction block.

[0226] Figure 11 is a flowchart illustrating an example method of decoding a current block in accordance with the techniques of this disclosure. The current block can include a current CU. Although described with respect to video decoder 300 Figure 5 and Figure 9 ), it should be understood that other devices can be configured to perform similar methods to Figure 11 .

[0227] Video decoder 300 can receive entropy encoded data for a current block, such as entropy encoded prediction information and entropy encoded coefficients for a residual block corresponding to the current block (370). Video decoder 300 can entropy decode the entropy encoded data to determine prediction information for the current block and to reproduce the coefficients for the residual block (372). Video decoder 300 can predict the current block (374), e.g., using an intra prediction or inter prediction mode as indicated by the prediction information for the current block, to compute a prediction block for the current block.

[0228] Video decoder 300 can use the gradient PDPC techniques of this disclosure to form the prediction block. In particular, video decoder 300 can use the gradient PDPC techniques of this disclosure to form the prediction block. For example, video decoder 300 can determine a direction for an angular intra prediction mode for the current block. Then, for at least one sample (potentially multiple or all samples) of the current block, video decoder 300 can calculate a gradient term for the sample along the prediction direction and combine the prediction value with the corresponding gradient term to ultimately form a final prediction block for the current block.

[0229] Video decoder 300 can inverse scan the reproduced coefficients (376) to create a block of quantized transform coefficients. Video decoder 300 can then inverse quantize and inverse transform the coefficients to produce a residual block (378). Video decoder 300 can ultimately decode the current block by combining the prediction block and the residual block (380).

[0230] In this way, Figure 11The method represents an example of a method for decoding video data, including generating an intra-frame prediction block of a current block of video data using an angular intra-frame prediction mode, the angular intra-frame prediction mode being a top-right angular intra-frame prediction mode or a bottom-left angular intra-frame prediction mode; determining a prediction direction of the angular intra-frame prediction mode; for at least one sample of the prediction block of the current block: calculating a gradient term of the sample along the prediction direction; and combining a value of the intra-frame predicted sample of the intra-frame prediction block at a position of the sample of the prediction block with the gradient term to generate a value of the sample of the prediction block; and decoding the current block using the prediction block.

[0231] Figure 12 1 is a flowchart illustrating an example method for predicting a block using gradient PDPC according to the techniques of this disclosure. For purposes of example and explanation, with respect to the video decoder 300 ( Figure 5 and Figure 9 ) to explain Figure 12 However, it should be understood that other devices (such as Figure 5 and Figure 8 The video encoder 200 may perform this method or a similar method. The video encoder 200 may perform Figure 12 As a method Figure 10 The video decoder 300 may perform step 350 of the method. Figure 12 As a method Figure 11 Part of step 374.

[0232] The video decoder 300 may initially determine that gradient PDPC is enabled (400). For example, the video decoder 300 may decode syntax data, such as a VPS, SPS, PPS, picture header, slice header, block header, etc., indicating that gradient PDPC is enabled for a corresponding unit of video data (entire video, sequence, picture, slice, block, etc.). Additionally or alternatively, the video decoder 300 may determine to use gradient PDPC for a current block based on implicit data, such as block size (e.g., greater than 4x4 and / or not a thin block, such as 2xN or Nx2), whether the current block is a luma block or a chroma block, nScale and nScale2 values ​​of the current block, etc.

[0233] Video decoder 300 can generate an intra prediction block using an angular intra prediction mode (402). The angular intra prediction mode can specifically be an upper-right angular intra prediction mode or a lower-left angular intra prediction mode. The upper-right angular intra prediction mode can include modes with mode numbers greater than 50 and less than 81, and the lower-left angular intra prediction mode can include modes with mode numbers less than 18 and not 0 and 1. In some examples, video decoder 300 can determine that gradient PDPC is limited to even fewer modes, e.g., using values of k1 and k2. For example, video decoder 300 can determine that the upper-right angular intra prediction mode has mode numbers greater than 50 and less than 50 + k2, and the lower-left angular intra prediction mode has mode numbers less than 18 - k1. Video decoder 300 can also determine k1 and k2 from syntax data, from preconfigured data, or from a size of the current block and / or a quantization parameter of the current block. Video decoder 300 can then determine that gradient PDPC is applicable to the angular intra prediction mode (404).

[0234] Video decoder 300 can determine a prediction direction for the angular intra prediction mode (406). Video decoder 300 can compute a gradient term for samples of the prediction block along the prediction direction (408). Video decoder 300 can then combine the predicted values of the samples with the gradient term to produce final values for the samples (410). Video decoder 300 can similarly update values of other samples of the prediction block using respective gradient terms.

[0235] In this manner, Figure 12 The method of represents an example of a method of decoding video data, including generating an intra prediction block for a current block of video data using an angular intra prediction mode, the angular intra prediction mode being an upper-right angular intra prediction mode or a lower-left angular intra prediction mode; determining a prediction direction for the angular intra prediction mode; for at least one sample of the prediction block of the current block: computing a gradient term for the sample along the prediction direction; and combining a value of an intra predicted sample of the intra prediction block at a location of the sample of the prediction block with the gradient term to produce a value of the sample of the prediction block; and decoding the current block using the prediction block.

[0236] The following clauses summarize various techniques of this disclosure:

[0237] Clause 1: A method of coding video data, the method comprising: generating, using an angular intra prediction mode, an intra prediction block for a current block of video data, the angular intra prediction mode being a top-right angular intra prediction mode or a bottom-left angular intra prediction mode; determining a prediction direction for the angular intra prediction mode; for each sample of the prediction block of the current block: calculating a gradient term for the sample along the prediction direction; and combining a value of an intra predicted sample of the intra prediction block at a location of the sample of the prediction block with the gradient term to produce a value of the sample of the prediction block; and coding the current block using the prediction block.

[0238] Clause 2: The method of clause 1, wherein the angular intra prediction mode comprises a top-right angular intra prediction mode having a mode number greater than 50 and less than 81.

[0239] Clause 3: The method of clause 1, wherein the angular intra prediction mode comprises a bottom-left angular intra prediction mode having a mode number less than 18 and not 0 or 1.

[0240] Clause 4: The method of any of clauses 1-3, further comprising, for each sample, calculating a displacement value using an angle of the angular intra prediction mode, wherein calculating the gradient term comprises calculating the gradient term using the displacement value.

[0241] Clause 5: The method of clause 4, wherein d comprises the displacement value, (x, y) comprises the location of the sample, and calculating the gradient term comprises calculating the gradient term to equal r(-1, y) - r(-1 + d, -1) when the angular intra prediction mode is the top-right angular intra prediction mode or r(x, -1) - r(-1, -1 + d) when the angular intra prediction mode is the bottom-left angular intra prediction mode, wherein r(x’, y’) represents a reference sample of a current picture comprising the current block that is adjacent to the current block in the current picture.

[0242] Clause 6: The method of any of clauses 1-5, wherein combining comprises applying a first weight to the value of the intra predicted sample and a second weight to the gradient term.

[0243] Clause 7: The method of clause 6, further comprising: determining the first weight according to a distance between the location of the sample and a location of a horizontally adjacent reference sample of a current picture comprising the current block when the angular intra prediction mode is the top-right angular intra prediction mode or according to a distance between the location of the sample and a location of a vertically adjacent reference sample of the current picture when the angular intra prediction mode is the bottom-left angular intra prediction mode.

[0244] Clause 8: The method of any of clauses 1-7, further comprising: determining that an nScale value for the current block is less than zero.

[0245] Clause 9: The method of any of clauses 1-8, wherein the lower-left angular intra prediction mode comprises a near lower-left angular intra prediction mode having a mode number less than 18 and greater than 18 - kl, and the upper-right intra prediction mode comprises a near upper-right angular intra prediction mode having a mode number greater than 50 and less than 50 + k2.

[0246] Clause 10: The method of clause 9, wherein kl and k2 are fixed values.

[0247] Clause 11: The method of clause 9, further comprising: calculating kl and k2 according to at least one of a size of the current block or a quantization parameter of the current block.

[0248] Clause 12: The method of clause 9, further comprising: coding parameter set data representing kl and k2, the parameter set data comprising data of a sequence parameter set (SPS) or a picture parameter set (PPS).

[0249] Clause 13: The method of any of clauses 1-12, further comprising: coding parameter set data enabling a gradient position dependent prediction (PDPC) mode for a current picture comprising the current block.

[0250] Clause 14: The method of any of clauses 1-13, further comprising: determining that an nScale value of the current block is less than an nScale2 value of the current block.

[0251] Clause 15: The method of any of clauses 1-14, wherein the combining of the values of the intra-predicted samples of the intra-predicted block at the positions of the samples of the prediction block with the gradient term to produce the values of the samples of the prediction block is performed only for luma components of the current block.

[0252] Clause 16: The method of any of clauses 1-15, wherein the combining of the values of the intra-predicted samples of the intra-predicted block at the positions of the samples of the prediction block with the gradient term to produce the values of the samples of the prediction block is not performed for chroma components of the current block.

[0253] Clause 17: The method of any of clauses 1-16, further comprising: determining whether chroma blocks of the current block are narrow; and based on the chroma blocks of the current block not being narrow, combining the values of the intra-predicted samples of the intra-predicted block at the positions of the samples of the prediction block with the gradient term to produce the values of the samples of the prediction block.

[0254] Clause 18: The method of any of clauses 1-17, further comprising: determining whether chroma blocks of the current block are narrow; and based on the chroma blocks of the current block being narrow, not combining the values of the intra-predicted samples of the intra-predicted block at the positions of the samples of the prediction block with the gradient term to produce the values of the samples of the prediction block.

[0255] Clause 19: The method of any of clauses 1-18, wherein coding the current block comprises decoding the current block, including: decoding a residual block of the current block; and combining the prediction block with the residual block to produce a decoded version of the current block.

[0256] Clause 20: The method of any of clauses 1-19, wherein coding the current block comprises encoding the current block, including: computing a residual block representing a difference between the current block and the prediction block; and encoding the residual block.

[0257] Clause 21: A device for coding video data, the device comprising means for performing the method of any of clauses 1-18.

[0258] Clause 22: The device of clause 19, wherein the one or more means comprise one or more processors implemented in circuitry.

[0259] Clause 23: The device of clause 19, further comprising a display configured to display the video data.

[0260] Clause 24: The device of clause 19, wherein the device comprises one or more of a camera, a computer, a mobile device, a broadcast receiver device, or a set-top box.

[0261] Clause 25: The device of clause 17, further comprising a memory configured to store the video data.

[0262] Clause 26: A device for coding video data, the device comprising: means for generating an intra prediction block for a current block of the video data using an angular intra prediction mode, the angular intra prediction mode being a top-right angular intra prediction mode or a bottom-left angular intra prediction mode; means for determining a prediction direction for the angular intra prediction mode; means for computing a respective gradient term for each sample of a prediction block of the current block along the prediction direction; means for combining a value of an intra-predicted sample of the intra prediction block at a location of each sample of the prediction block and the respective gradient term corresponding to the sample of the prediction block to produce a value of the sample of the prediction block; and means for coding the current block using the prediction block.

[0263] Clause 27: A computer-readable storage medium having stored thereon instructions that, when executed by a processor of a device for coding video data, perform the method of any of clauses 1-16. It should be appreciated that certain acts or events that are described in this specification can be performed in a different sequence, may

[0264] In one or more examples, the functions described can be implemented in hardware, software, firmware, or any combination thereof. If implemented in software, the functions can be stored on or transmitted over as one or more instructions or code on a computer-readable medium and executed by a hardware-based processing unit. Computer-readable media can include computer-readable storage media, which corresponds to a tangible medium such as data storage media, or communication media including any medium that facilitates transfer of a computer program from one place to another, e.g., according to a communication protocol. In this manner, computer- readable media generally can correspond to (1) tangible computer-readable storage media which is non-transitory or (2) a communication medium such as a signal or carrier wave. Data storage media can be any available media that can be accessed by one or more computers or one or more processors to retrieve instructions, code and / or data structures for implementation of the techniques described in this disclosure. A computer program product can include a computer-readable medium.

[0265] By way of example, and not limitation, such computer-readable storage media can include RAM, ROM, EEPROM, CD-ROM or other optical disk storage, magnetic disk storage, or other magnetic storage devices, flash memory, or any other storage medium that can be used to store desired program code in the form of instructions or data structures and that can be accessed by a computer. Also, any

[0266] Instructions can 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 circuitry. Accordingly, the term "processor" as used herein can refer to any of the foregoing structure or any other structure suitable for implementation of the techniques described herein. In addition, in some aspects, the functionality described herein can be provided within dedicated hardware and / or software modules configured for encoding and decoding, or incorporated in a combined codec. Also, the techniques could be fully implemented in one or more circuits or logic elements.

[0267] The techniques of this disclosure can be implemented in a variety of devices or apparatuses including wireless handsets, integrated circuitry (IC) or IC packages (for example, a chip set), among others. Various components, modules, or units are described herein to emphasize their implementation as functional aspects of the apparatuses configured to perform the disclosed techniques, but it should be understood that the various components, modules, or units can be implemented by hardware, software, firmware, or combinations thereof, and it should be further understood that the various components, modules, or units are not required to be implemented by separate hardware, software, firmware, or combinations thereof. Rather, it is contemplated that the various components, modules, or units can be combined in a codec hardware unit, or provided by a combination of hardware, software, and / or firmware, as discussed above.

[0268] Various examples have been described. These and other examples are within the scope of the following claims.

Claims

1. A method of decoding video data, the method comprising: generating an intra prediction block for a current block of video data using an angular intra prediction mode, the angular intra prediction mode being a top-right angular intra prediction mode or a bottom-left angular intra prediction mode; determining, according to a position dependent intra prediction, PDPC, mode, that a boundary sample of a secondary boundary of at least one sample of the intra prediction block is unavailable; in response to determining that the boundary sample of the secondary boundary is unavailable: determining a prediction direction of the angular intra prediction mode; for the at least one sample of the intra prediction block of the current block: calculating, using available samples of the secondary boundary, an intensity gradient term for the at least one sample along the intra prediction direction, wherein the available samples of the secondary boundary are different from the boundary sample of the secondary boundary determined for the PDPC mode; and combining a value of an intra predicted sample of the intra prediction block at the position of the at least one sample of the intra prediction block with the intensity gradient term to produce a value of the at least one sample of the intra prediction block; and decoding the current block using the intra prediction block. the angular intra prediction mode comprises a top-right angular intra prediction mode having a mode number greater than 50 and less than 81. the angular intra prediction mode comprises a bottom-left angular intra prediction mode having a mode number less than 18 and not 0 or 1.

2. The method of claim 1, wherein, calculating the intensity gradient term comprises calculating the intensity gradient term using the displacement value.

3. The method of claim 1, wherein, d comprises the displacement value, (x, y) comprises the position of the at least one sample, and calculating the intensity gradient term comprises:

4. The method of claim 1, further comprising, for the at least one sample, using the angle of the angular intra prediction mode to calculate a displacement value, wherein, when the angular intra prediction mode is the top-right angular intra prediction mode, calculating the intensity gradient term as equal to r(-1, y) - r(-1 + d, -1); or 5. The method of claim 4, wherein, when the angular intra prediction mode is the bottom-left angular intra prediction mode, calculating the intensity gradient term as equal to r(x, -1) - r(-1, -1 + d), where r(x’, y’) represents a reference sample of a current picture comprising the current block at position (x’, y’), the reference sample being adjacent to the current block in the current picture. combining comprises applying a first weight to the value of the intra predicted sample and a second weight to the intensity gradient term.

7. The method of claim 6, further comprising:

6. The method of claim 1, wherein, when the angular intra prediction mode is the top-right angular intra prediction mode, determining the first weight according to a distance between the position of the at least one sample and a position of a horizontally neighboring reference sample of a current picture comprising the current block; or when the angular intra prediction mode is the bottom-left angular intra prediction mode, determining the first weight according to a distance between the position of the at least one sample and a position of a vertically neighboring reference sample of the current picture.

8. The method of claim 1, further comprising: ​ ​ calculating an nScale value for the current block, including calculating the nScale value according to Min(2, Log2(nTbH) - Floor(Log2(3*invAngle-2)) + 8), where nTbH represents a height of the current block, and invAngle represents the prediction direction; and determining that the nScale value for the current block is less than zero.

9. The method of claim 5, wherein, the near-left-bottom angular intra prediction modes include angular intra prediction modes with mode numbers less than 18 and greater than 18-k1, and the near-top-right angular intra prediction modes include angular intra prediction modes with mode numbers greater than 50 and less than 50+k2.

10. The method of claim 9, wherein, k1 and k2 are fixed values.

11. The method of claim 9, further comprising: k1 and k2 are calculated according to at least one of a size of the current block or a quantization parameter of the current block.

12. The method of claim 9, further comprising: decoding parameter set data representing k1 and k2, the parameter set data including data of a sequence parameter set (SPS) or a picture parameter set (PPS).

13. The method of claim 1, further comprising: decoding parameter set data enabling a gradient position dependent prediction (PDPC) mode for a current picture including the current block.

14. The method of claim 1, wherein, the current block includes a luma block.

15. The method of claim 1, wherein, decoding a current block includes: decoding a residual block for the current block; and combining the intra prediction block and the residual block to produce a decoded version of the current block.

16. The method of claim 1, further comprising: encoding a current block prior to decoding the current block, wherein encoding the current block includes: calculating a residual block representing a difference between the current block and the intra prediction block; and encoding the residual block.

17. A device for decoding video data, the device comprising: a memory configured to store video data; and one or more processors implemented in circuitry configured to: generate an intra prediction block for a current block of video data using an angular intra prediction mode, the angular intra prediction mode being a top-right angular intra prediction mode or a bottom-left angular intra prediction mode; determine, according to a position dependent prediction (PDPC) mode, that a boundary sample of a secondary boundary for at least one sample of the intra prediction block is unavailable; in response to determining that the boundary sample of the secondary boundary is unavailable: determine a prediction direction of the angular intra prediction mode; for the at least one sample of the intra prediction block of the current block: calculate, using available samples of the secondary boundary, an intensity gradient term for the at least one sample along the prediction direction, wherein the available samples of the secondary boundary are different from the boundary sample of the secondary boundary determined for the PDPC mode; and combine, with a value of an intra predicted sample of the intra prediction block at a position of the at least one sample of the intra prediction block, the intensity gradient term to produce a value of the at least one sample of the intra prediction block; and decode the current block using the intra prediction block. the angular intra prediction mode includes a top-right angular intra prediction mode with a mode number greater than 50 and less than 81. the angular intra prediction mode includes a bottom-left angular intra prediction mode with a mode number less than 18 and not 0 or 1.

18. The apparatus of claim 17, wherein, ​ 19. The apparatus of claim 17, wherein, ​ 20. The apparatus of claim 17, wherein, The one or more processors are further configured to, for the at least one sample, calculate a displacement value using an angle of the angular intra prediction mode, wherein the one or more processors are configured to calculate the intensity gradient term using the displacement value.

21. The apparatus of claim 20, wherein, d includes the displacement value, (x, y) includes a position of the at least one sample, and the one or more processors are configured to calculate an intensity gradient term according to: when the angular intra prediction mode is a right-up angular intra prediction mode, calculating the intensity gradient term to be equal to r(-1, y) - r(-1 + d, -1); or when the angular intra prediction mode is a left-down angular intra prediction mode, calculating the intensity gradient term to be equal to r(x, -1) - r(-1, -1 + d), wherein r(x’, y’) represents a reference sample of a current picture including a current block at position (x’, y’), the reference sample being adjacent to the current block in the current picture.

22. The apparatus of claim 17, wherein, The one or more processors are configured to apply a first weight to a value of the intra-predicted sample and a second weight to the intensity gradient term.

23. The apparatus of claim 22, wherein, The one or more processors are further configured to: when the angular intra prediction mode is a right-up angular intra prediction mode, determine the first weight according to a distance between a position of the at least one sample and a position of a horizontally neighboring reference sample of a current picture including the current block; or when the angular intra prediction mode is a left-down angular intra prediction mode, determine the first weight according to a distance between a position of the at least one sample and a position of a vertically neighboring reference sample of the current picture.

24. The apparatus of claim 17, wherein, The one or more processors are further configured to: calculate an nScale value of the current block including: calculating the nScale value according to Min(2, Log2(nTbH) - Floor(Log2(3*invAngle - 2)) + 8), wherein nTbH represents a height of the current block, and invAngle represents the prediction direction; and determine that the nScale value of the current block is less than zero.

25. The apparatus of claim 21, wherein, The left-down angular intra prediction mode includes a near-left-down angular intra prediction mode with a mode number less than 18 and greater than 18 - k1, and the right-up angular intra prediction mode includes a near-right-up angular intra prediction mode with a mode number greater than 50 and less than 50 + k2.

26. The apparatus of claim 17, wherein, The one or more processors are further configured to decode parameter set data, the parameter set data enabling a gradient position dependent intra prediction (PDPC) mode for a current picture including the current block.

27. The device of claim 17, further comprising: a display configured to display the video data.

28. The apparatus of claim 17, wherein, The device includes one or more of a camera, a computer, a mobile device, a broadcast receiver device, or a set-top box.

29. A computer-readable storage medium having instructions stored thereon that, when executed, cause a processor to: generate an intra-predicted block of a current block of video data using an angular intra prediction mode, the angular intra prediction mode being a right-up angular intra prediction mode or a left-down angular intra prediction mode; According to a position-dependent intra prediction, PDPC, mode, a boundary sample of a secondary boundary of at least one sample of an intra prediction block is unavailable; in response to determining that the boundary sample of the secondary boundary is unavailable: determining a prediction direction of the angular intra prediction mode; for the at least one sample of the intra prediction block of the current block: using available samples of the secondary boundary, computing an intensity gradient term of the at least one sample along a prediction direction, wherein the available samples of the secondary boundary are different from boundary samples of the secondary boundary determined for the PDPC mode; and combining a value of an intra-predicted sample of the intra prediction block at a position of the at least one sample of the intra prediction block with the intensity gradient term to produce a value of the at least one sample of the intra prediction block; and and using the intra prediction block to decode the current block.

Citation Information

Patent Citations

  • Gradient based boundary filtering in intra prediction

    WO2019165343A1