Patent Description:
<NUM>, ITU-T H. <NUM>/MPEG-<NUM>, Part <NUM>, Advanced Video Coding (AVC), the High Efficiency Video Coding (HEVC) standard, ITU-T H.

<CIT> describes a method of decoding video data comprising receiving a block of video data encoded using a position dependent intra prediction combination (PDPC) mode. The block of video data has a non-square shape defined by a width and a height. One or more PDPC parameters are determined based on one or more of the width or the height of the block of video data. The block of video data is decoded using the PDPC mode and the determined PDPC parameters.

The article "<NPL> describes an extension to HEVC intra prediction that combines values predicted using non-filtered and filtered (smoothed) reference samples, depending on the prediction mode, and block size.

<NPL> describes at section <NUM>. <NUM> position dependent intra prediction is applied to planar, DC, horizontal and vertical modes without signalling.

In general, this disclosure describes techniques related to intra predicting a block of video data. More specifically, this disclosure describes techniques related to intra prediction using position dependent (intra) prediction combination (PDPC).

The invention is defined in the appended independent claims. Optional features are defined in the appended dependent claims.

Various video coding standards, including the recently developed High Efficiency Video Coding (HEVC) standard and the versatile video coding (VVC) standard presently under development, include predictive coding modes for video blocks, where a block currently being coded (i.e., encoded or decoded) is predicted based on an already coded block of video data. In an intra prediction mode, the current block is predicted based on one or more previously coded, neighboring blocks in the same picture as the current block, while in an inter prediction mode the current block is predicted based on an already coded block in a different picture. In inter prediction mode, the process of determining a block of a previously coded frame to use as a predictive block is sometimes referred to as motion estimation, which is generally performed by a video encoder, and the process of identifying and retrieving a predictive block is sometimes referred to as motion compensation, which is performed by both video encoders and video decoders.

To generate the predictive block using intra prediction, the video coder (i.e., video encoder or video decoder) may determine values of samples of the predictive block based on a set of reference samples. The set of reference samples may include samples of the current picture that are in a column left of the current block and samples of the current picture that are in a row above the current block. The video coder uses the reference samples to determine the values of the samples of the predictive block in different ways depending on an intra prediction mode of the predictive block. Earlier implementations of intra prediction only used the row or column of samples immediately adjacent to the block being coded. Newer implementations of intra prediction, however, may utilize multiple reference lines and, additionally or alternatively, may also use lines that are not immediately adjacent to the block being coded.

Prior to determining the values of the samples of the predictive block based on the set of reference samples, the video coder may apply a filter to the reference samples. Applying the filter to the reference samples may improve compression efficiency. Multiple techniques have been developed for applying various types of filters to the reference samples. For example, Mode Dependent Intra Smoothing (MDIS) is one technique for applying filters to the reference samples. In MDIS, the video coder may determine whether to apply any filters to the reference samples depending on the intra prediction mode and the size of the predictive block. Additionally, if the video coder makes the determination to apply a filter to the reference pictures, the video coder may apply different filters to the reference samples depending on the intra prediction mode and the size of the predictive block. The video coder may store both the original unfiltered reference samples (e.g., for the purpose of outputting the reference samples or reuse in prediction of other blocks) and may need to store the filtered reference samples.

In addition to applying a filter to the reference samples as part of performing MDIS, the video coder may apply an interpolation filter to the reference samples. The video coder applies the interpolation filter to integer reference samples to determine values of reference samples between the integer reference samples. The integer reference samples are reference samples at integer-valued coordinates within the current picture. The video coder may use the interpolated reference samples to determine values of samples in the predictive block. When applying an interpolation filter, the video coder may apply a set of weights to the integer reference samples. There may be different weights for different sub-integer positions.

Moreover, the video coder may be configured to apply different types of interpolation filters in different circumstances. For instance, the video coder may be configured to apply a cubic interpolation filter in some circumstances and a Gaussian interpolation filter in other circumstances. Like the filter applied as part of performing MDIS, the Gaussian interpolation filter may provide a smoothing effect. Thus, the video coder in effect may apply two smoothing filter operations consecutively. A smoothing filter is a lowpass filter that passes signals which are lower than a cutoff frequency. A non-smoothing filter is an all-pass filter or a filter with a cutoff frequency cutoff that is higher than the cutoff frequency of the smoothing filter.

The cubic interpolation filter may contain negative tap coefficients, which may lead to out-of-range values. When multiple reference lines ae used, the video coder may apply a cubic filter to more than one line and obtain a reference sample by combining (e.g. weighted average) the filtered samples from each line. In such cases, performing a clipping operation after combining the samples may result in amplifying errors that may occur due to out-of-range values.

The video coder may additionally use position dependent intra prediction combination (PDPC) to intra predict a block. In PDPC, the video coder determines the values for samples from the top reference line and the left reference line (referred to as PDPC reference samples) and uses a weighted average of the PDPC reference samples with the sample obtained from the intra prediction mode to achieve better compression efficiency. This disclosure describes techniques for controlling whether or not to perform filtering in conjunction with intra prediction and PDPC. The techniques of this disclosure, which dissociate the use of filtering of PDPC reference samples from the filtering of the reference samples used for regular intra prediction, may improve overall video coding quality and efficiency.

<FIG> is a block diagram illustrating an example video encoding and decoding system <NUM> that may perform the intra-prediction related techniques of this disclosure. The techniques of this disclosure are generally directed to coding (encoding and/or decoding) video data are more specifically directed to intra prediction using PDPC. In general, video data includes any data for processing a video. Thus, video data may include raw, uncoded video, encoded video, decoded (e.g., reconstructed) video, and video metadata, such as signaling data.

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

In the example of <FIG>, source device <NUM> includes video source <NUM>, memory <NUM>, video encoder <NUM>, and output interface <NUM>. Destination device <NUM> includes input interface <NUM>, video decoder <NUM>, memory <NUM>, and display device <NUM>. In accordance with this disclosure, video encoder <NUM> of source device <NUM> and video decoder <NUM> of destination device <NUM> may be configured to apply the techniques for performing a clipping operation on each respective samples from each reference line, either before or after a filter is applied. Thus, source device <NUM> represents an example of a video encoding device, while destination device <NUM> represents an example of a video decoding device. In other examples, a source device and a destination device may include other components or arrangements. For example, source device <NUM> may receive video data from an external video source, such as an external camera. Likewise, destination device <NUM> may interface with an external display device, rather than including an integrated display device.

System <NUM> as shown in <FIG> is merely one example. In general, any digital video encoding and/or decoding device may perform techniques for performing a clipping operation on each respective samples from each reference line, either before or after a filter is applied. Source device <NUM> and destination device <NUM> are merely examples of such coding devices in which source device <NUM> generates coded video data for transmission to destination device <NUM>. This disclosure refers to a "coding" device as a device that performs coding (encoding and/or decoding) of data. Thus, video encoder <NUM> and video decoder <NUM> represent examples of coding devices, in particular, a video encoder and a video decoder, respectively. In some examples, devices <NUM>, <NUM> may operate in a substantially symmetrical manner such that each of devices <NUM>, <NUM> include video encoding and decoding components. Hence, system <NUM> may support one-way or two-way video transmission between video devices <NUM>, <NUM>, e.g., for video streaming, video playback, video broadcasting, or video telephony.

In general, video source <NUM> represents a source of video data (i.e., raw, uncoded video data) and provides a sequential series of pictures (also referred to as "frames") of the video data to video encoder <NUM>, which encodes data for the pictures. Video source <NUM> of source device <NUM> may 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 <NUM> may generate computer graphics-based data as the source video, or a combination of live video, archived video, and computer-generated video. In each case, video encoder <NUM> encodes the captured, pre-captured, or computer-generated video data. Video encoder <NUM> may rearrange the pictures from the received order (sometimes referred to as "display order") into a coding order for coding. Video encoder <NUM> may generate a bitstream including encoded video data. Source device <NUM> may then output the encoded video data via output interface <NUM> onto computer-readable medium <NUM> for reception and/or retrieval by, e.g., input interface <NUM> of destination device <NUM>.

Memory <NUM> of source device <NUM> and memory <NUM> of destination device <NUM> represent general purpose memories. In some example, memories <NUM>, <NUM> may store raw video data, e.g., raw video from video source <NUM> and raw, decoded video data from video decoder <NUM>. Additionally or alternatively, memories <NUM>, <NUM> may store software instructions executable by, e.g., video encoder <NUM> and video decoder <NUM>, respectively. Although shown separately from video encoder <NUM> and video decoder <NUM> in this example, it should be understood that video encoder <NUM> and video decoder <NUM> may also include internal memories for functionally similar or equivalent purposes. Furthermore, memories <NUM>, <NUM> may store encoded video data, e.g., output from video encoder <NUM> and input to video decoder <NUM>. In some examples, portions of memories <NUM>, <NUM> may be allocated as one or more video buffers, e.g., to store raw, decoded, and/or encoded video data.

Computer-readable medium <NUM> may represent any type of medium or device capable of transporting the encoded video data from source device <NUM> to destination device <NUM>. In one example, computer-readable medium <NUM> represents a communication medium to enable source device <NUM> to transmit encoded video data directly to destination device <NUM> in real-time, e.g., via a radio frequency network or computer-based network. Output interface <NUM> may modulate a transmission signal including the encoded video data, and input interface <NUM> may modulate the received transmission signal, according to a communication standard, such as a wireless communication protocol. The communication medium may comprise any wireless or wired communication medium, such as a radio frequency (RF) spectrum or one or more physical transmission lines. The communication medium may form part of a packet-based network, such as a local area network, a wide-area network, or a global network such as the Internet. The communication medium may include routers, switches, base stations, or any other equipment that may be useful to facilitate communication from source device <NUM> to destination device <NUM>.

In some examples, source device <NUM> may output encoded data from output interface <NUM> to storage device <NUM>. Similarly, destination device <NUM> may access encoded data from storage device <NUM> via input interface <NUM>. Storage device <NUM> may 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.

In some examples, source device <NUM> may output encoded video data to file server <NUM> or another intermediate storage device that may store the encoded video generated by source device <NUM>. Destination device <NUM> may access stored video data from file server <NUM> via streaming or download. File server <NUM> may be any type of server device capable of storing encoded video data and transmitting that encoded video data to the destination device <NUM>. File server <NUM> may 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 <NUM> may access encoded video data from file server <NUM> through any standard data connection, including an Internet connection. This may include a wireless channel (e.g., a Wi-Fi connection), a wired connection (e.g., DSL, cable modem, etc.), or a combination of both that is suitable for accessing encoded video data stored on file server <NUM>. File server <NUM> and input interface <NUM> may be configured to operate according to a streaming transmission protocol, a download transmission protocol, or a combination thereof.

Output interface <NUM> and input interface <NUM> may represent wireless transmitters/receiver, modems, wired networking components (e.g., Ethernet cards), wireless communication components that operate according to any of a variety of IEEE <NUM> standards, or other physical components. In examples where output interface <NUM> and input interface <NUM> comprise wireless components, output interface <NUM> and input interface <NUM> may be configured to transfer data, such as encoded video data, according to a cellular communication standard, such as <NUM>, <NUM>-LTE (Long-Term Evolution), LTE Advanced, <NUM>, or the like. In some examples where output interface <NUM> comprises a wireless transmitter, output interface <NUM> and input interface <NUM> may be configured to transfer data, such as encoded video data, according to other wireless standards, such as an IEEE <NUM> specification, an IEEE <NUM> specification (e.g., ZigBee™), a Bluetooth™ standard, or the like. In some examples, source device <NUM> and/or destination device <NUM> may include respective system-on-a-chip (SoC) devices. For example, source device <NUM> may include an SoC device to perform the functionality attributed to video encoder <NUM> and/or output interface <NUM>, and destination device <NUM> may include an SoC device to perform the functionality attributed to video decoder <NUM> and/or input interface <NUM>.

Input interface <NUM> of destination device <NUM> receives an encoded video bitstream from computer-readable medium <NUM> (e.g., storage device <NUM>, file server <NUM>, or the like). The encoded video bitstream computer-readable medium <NUM> may include signaling information defined by video encoder <NUM>, which is also used by video decoder <NUM>, such as syntax elements having values that describe characteristics and/or processing of video blocks or other coded units (e.g., slices, pictures, groups of pictures, sequences, or the like). Display device <NUM> displays decoded pictures of the decoded video data to a user. Display device <NUM> 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 another type of display device.

Video encoder <NUM> and video decoder <NUM> may operate according to a video coding standard, such as ITU-T H. <NUM>, also referred to as High Efficiency Video Coding (HEVC) or extensions thereto, such as the multi-view and/or scalable video coding extensions. Alternatively, video encoder <NUM> and video decoder <NUM> may operate according to other proprietary or industry standards, such as the Joint Exploration Test Model (JEM). The techniques of this disclosure, however, are not limited to any particular coding standard.

As another example, video encoder <NUM> and video decoder <NUM> may be configured to operate according to JEM. According to JEM, a video coder (such as video encoder <NUM>) partitions a picture into a plurality of coding tree units (CTUs). Video encoder <NUM> may partition a CTU according to a tree structure, such as a quadtree-binary tree (QTBT) structure. The QTBT structure of JEM removes the concepts of multiple partition types, such as the separation between CUs, PUs, and TUs of HEVC. A QTBT structure of JEM includes two levels: a first level partitioned according to quadtree partitioning, and a second level partitioned 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).

In some examples, video encoder <NUM> and video decoder <NUM> may use a single QTBT structure to represent each of the luminance and chrominance components, while in other examples, video encoder <NUM> and video decoder <NUM> may use two or more QTBT structures, such as one QTBT structure for the luminance component and another QTBT structure for both chrominance components (or two QTBT structures for respective chrominance components).

Video encoder <NUM> and video decoder <NUM> may be configured to use quadtree partitioning per HEVC, QTBT partitioning according to JEM, or other partitioning structures.

JEM also provides an affine motion compensation mode, which may be considered an inter-prediction mode. In affine motion compensation mode, video encoder <NUM> may determine two or more motion vectors that represent non-translational motion, such as zoom in or out, rotation, perspective motion, or other irregular motion types.

To perform intra-prediction, video encoder <NUM> may select an intra-prediction mode to generate the prediction block. JEM provides sixty-seven intra-prediction modes, including various directional modes, as well as planar mode and DC mode. In general, video encoder <NUM> selects an intra-prediction mode that describes neighboring samples to a current block (e.g., a block of a CU) from which to predict samples of the current block. Such samples may generally be above, above and to the left, or to the left of the current block in the same picture as the current block, assuming video encoder <NUM> codes CTUs and CUs in raster scan order (left to right, top to bottom).

As noted above, following any transforms to produce transform coefficients, video encoder <NUM> may perform quantization of the transform coefficients. Quantization generally refers to a process in which transform coefficients are quantized to possibly reduce the amount of data used to represent the coefficients, providing further compression. By performing the quantization process, video encoder <NUM> may reduce the bit depth associated with some or all of the coefficients. For example, video encoder <NUM> may round an n-bit value down to an m-bit value during quantization, where n is greater than m. In some examples, to perform quantization, video encoder <NUM> may perform a bitwise right-shift of the value to be quantized.

Following quantization, video encoder <NUM> may scan the transform coefficients, producing a one-dimensional vector from the two-dimensional matrix including the quantized transform coefficients. The scan may be designed to place higher energy (and therefore lower frequency) coefficients at the front of the vector and to place lower energy (and therefore higher frequency) transform coefficients at the back of the vector. In some examples, video encoder <NUM> may 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 <NUM> may perform an adaptive scan. After scanning the quantized transform coefficients to form the one-dimensional vector, video encoder <NUM> may entropy encode the one-dimensional vector, e.g., according to context-adaptive binary arithmetic coding (CABAC). Video encoder <NUM> may also entropy encode values for syntax elements describing metadata associated with the encoded video data for use by video decoder <NUM> in decoding the video data.

In general, video decoder <NUM> performs a reciprocal process to that performed by video encoder <NUM> to decode the encoded video data of the bitstream. For example, video decoder <NUM> may decode values for syntax elements of the bitstream using CABAC in a manner substantially similar to, albeit reciprocal to, the CABAC encoding process of video encoder <NUM>. The syntax elements may define partitioning information of a picture 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 may further define prediction and residual information for blocks (e.g., CUs) of video data.

In accordance with the techniques of this disclosure, video decoder <NUM> may determine that a block if video data is coded using an intra prediction mode. Video decoder <NUM> may also filter a sample of a block of video data to determine a filtered value. Video decoder <NUM> may further determine that the filtered value comprises an out-of-range value. In response to determining that the filtered value comprises the out-of-range value, video decoder <NUM> may perform a clipping operation on the out-of-range value.

In accordance with the techniques of this disclosure, video decoder <NUM> determines that a block of video data is coded using an intra prediction mode with PDPC and, when the intra prediction mode belongs to a subset of intra prediction modes, predicts the block of video data using unfiltered reference samples as PDPC-reference samples.

In accordance with the techniques of this disclosure, video decoder <NUM> may determine that a block of video data is coded using an intra prediction mode with PDPC. Video decoder <NUM> may, in response to the intra prediction mode being a particular intra prediction mode not belonging to the subset of intra prediction modes, filter reference samples and predict the block of video data using the filtered reference samples as PDPC-reference samples.

In accordance with the techniques of this disclosure, video decoder <NUM> may determine that a block of video data is coded using an intra prediction mode with PDPC. Video decoder <NUM> may further determine whether to filter reference samples based on one or more additional criteria. In response to determining to filter the reference samples, video decoder <NUM> may predict the block of video data using filtered reference samples as PDPC-reference samples.

In accordance with the techniques of this disclosure, video decoder <NUM> may determine that a block of video data is coded using an intra prediction mode with PDPC. When the intra prediction does not belong to the subset of intra prediction modes, video decoder <NUM> may apply a first filter to obtain PDPC-reference samples and apply a second filter to obtain reference samples for prediction, wherein the first filter is a different filter than the second filter.

In accordance with the techniques of this disclosure, video encoder <NUM> may perform any of the above techniques performed by video decoder <NUM> as part of a decoding loop of a video encoding process.

This disclosure may generally refer to "signaling" certain information, such as syntax elements. The term "signaling" may generally refer to the communication of values syntax elements and/or other data used to decode encoded video data. That is, video encoder <NUM> may signal values for syntax elements in the bitstream. In general, signaling refers to generating a value in the bitstream. As noted above, source device <NUM> may transport the bitstream to destination device <NUM> substantially in real time, or not in real time, such as might occur when storing syntax elements to storage device <NUM> for later retrieval by destination device <NUM>.

<FIG> are conceptual diagram illustrating an example quadtree binary tree (QTBT) structure <NUM>, and a corresponding coding tree unit (CTU) <NUM>. The solid lines represent quadtree splitting, and dotted lines indicate binary tree splitting. In each split (i.e., non-leaf) node of the binary tree, one flag is signaled to indicate which splitting type (i.e., horizontal or vertical) is used, where <NUM> indicates horizontal splitting and <NUM> indicates vertical splitting in this example. For the quadtree splitting, there is no need to indicate the splitting type, since quadtree nodes split a block horizontally and vertically into <NUM> sub-blocks with equal size. Accordingly, video encoder <NUM> may encode, and video decoder <NUM> may decode, syntax elements (such as splitting information) for a region tree level of QTBT structure <NUM> (i.e., the solid lines) and syntax elements (such as splitting information) for a prediction tree level of QTBT structure <NUM> (i.e., the dashed lines). Video encoder <NUM> may encode, and video decoder <NUM> may decode, video data, such as prediction and transform data, for CUs represented by terminal leaf nodes of QTBT structure <NUM>.

In one example of the QTBT partitioning structure, the CTU size is set as 128x128 (luma samples and two corresponding 64x64 chroma samples), the MinQTSize is set as 16x16, the MaxBTSize is set as 64x64, the MinBTSize (for both width and height) is set as <NUM>, and the MaxBTDepth is set as <NUM>. The quadtree partitioning is applied to the CTU first to generate quad-tree leaf nodes. The quadtree leaf nodes may have a size from 16x16 (i.e., the MinQTSize) to 128x128 (i.e., the CTU size). If the leaf quadtree node is 128x128, it will not be further split by the binary tree, since the size exceeds the MaxBTSize (i.e., 64x64, in this example). Otherwise, the leaf quadtree node will be further partitioned by the binary tree. Therefore, the quadtree leaf node is also the root node for the binary tree and has the binary tree depth as <NUM>. When the binary tree depth reaches MaxBTDepth (<NUM>, in this example), no further splitting is permitted. When the binary tree node has width equal to MinBTSize (<NUM>, in this example), it implies no further horizontal splitting is permitted. Similarly, a binary tree node having a height equal to MinBTSize implies no further vertical splitting is permitted for that binary tree node. As noted above, leaf nodes of the binary tree are referred to as CUs and are further processed according to prediction and transform without further partitioning.

<FIG> is a block diagram illustrating an example video encoder <NUM> that may perform the techniques of this disclosure. <FIG> is provided for purposes of explanation and should not be considered limiting of the techniques as broadly exemplified and described in this disclosure. For purposes of explanation, this disclosure describes video encoder <NUM> in the context of video coding standards such as the HEVC video coding standard and the H. <NUM> video coding standard in development. However, the techniques of this disclosure are not limited to these video coding standards, and are applicable generally to video encoding and decoding.

In the example of <FIG>, video encoder <NUM> includes video data memory <NUM>, mode selection unit <NUM>, residual generation unit <NUM>, transform processing unit <NUM>, quantization unit <NUM>, inverse quantization unit <NUM>, inverse transform processing unit <NUM>, reconstruction unit <NUM>, filter unit <NUM>, decoded picture buffer (DPB) <NUM>, and entropy encoding unit <NUM>.

The various units of <FIG> are illustrated to assist with understanding the operations performed by video encoder <NUM>. The units may 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 on the operations that can be performed. Programmable circuits refer to circuits that can programmed to perform various tasks, and provide flexible functionality in the operations that can be performed. For instance, programmable circuits may 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 may 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, the one or more of the units may be distinct circuit blocks (fixed-function or programmable), and in some examples, the one or more units may be integrated circuits.

Video encoder <NUM> may 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 video encoder <NUM> are performed using software executed by the programmable circuits, memory <NUM> (<FIG>) may store the object code of the software that video encoder <NUM> receives and executes, or another memory within video encoder <NUM> (not shown) may store such instructions.

Mode selection unit <NUM> includes a motion estimation unit <NUM>, motion compensation unit <NUM>, and an intra-prediction unit <NUM>. Mode selection unit <NUM> may include additional functional units to perform video prediction in accordance with other prediction modes. As examples, mode selection unit <NUM> may include a palette unit, an intra-block copy unit (which may be part of motion estimation unit <NUM> and/or motion compensation unit <NUM>), an affine unit, a linear model (LM) unit, or the like.

Video encoder <NUM> may partition a picture retrieved from video data memory <NUM> into a series of CTUs, and encapsulate one or more CTUs within a slice. Mode selection unit <NUM> may partition a CTU of the picture in accordance with a tree structure, such as the QTBT structure or the quad-tree structure of HEVC described above. As described above, video encoder <NUM> may form one or more CUs from partitioning a CTU according to the tree structure. Such a CU may also be referred to generally as a "video block" or "block.

Motion estimation unit <NUM> may form one or more motion vectors (MVs) that defines the positions of the reference blocks in the reference pictures relative to the position of the current block in a current picture. Motion estimation unit <NUM> may then provide the motion vectors to motion compensation unit <NUM>. For example, for uni-directional inter-prediction, motion estimation unit <NUM> may provide a single motion vector, whereas for bi-directional inter-prediction, motion estimation unit <NUM> may provide two motion vectors. Motion compensation unit <NUM> may then generate a prediction block using the motion vectors. For example, motion compensation unit <NUM> may retrieve data of the reference block using the motion vector. As another example, if the motion vector has fractional sample precision, motion compensation unit <NUM> may interpolate values for the prediction block according to one or more interpolation filters. Moreover, for bi-directional inter-prediction, motion compensation unit <NUM> may retrieve data for two reference blocks identified by respective motion vectors and combine the retrieved data, e.g., through sample-by-sample averaging or weighted averaging.

Mode selection unit <NUM> provides the prediction block to residual generation unit <NUM>. Residual generation unit <NUM> receives a raw, uncoded version of the current block from video data memory <NUM> and the prediction block from mode selection unit <NUM>. Residual generation unit <NUM> calculates sample-by-sample differences between the current block and the prediction block. The resulting sample-by-sample differences define a residual block for the current block. In some examples, residual generation unit <NUM> may also determine differences between sample values in the residual block to generate a residual block using residual differential pulse code modulation (RDPCM). In some examples, residual generation unit <NUM> may be formed using one or more subtractor circuits that perform binary subtraction.

In examples where mode selection unit does not further partition a CU into PUs, each CU may be associated with a luma coding block and corresponding chroma coding blocks. As above, the size of a CU may refer to the size of the luma coding block of the CU. The video encoder <NUM> and video decoder <NUM> may support CU sizes of 2Nx2N, 2NxN, or Nx2N.

For other video coding techniques such as an intra-block copy mode coding, an affine-mode coding, and linear model (LM) mode coding, as few examples, mode selection unit <NUM>, via respective units associated with the coding techniques, generates a prediction block for the current block being encoded. In some examples, such as palette mode coding, mode selection unit <NUM> may not generate a prediction block, and instead generate syntax elements that indicate the manner in which to reconstruct the block based on a selected palette. In such modes, mode selection unit <NUM> may provide these syntax elements to entropy encoding unit <NUM> to be encoded.

Quantization unit <NUM> may quantize the transform coefficients in a transform coefficient block, to produce a quantized transform coefficient block. Quantization unit <NUM> may quantize transform coefficients of a transform coefficient block according to a quantization parameter (QP) value associated with the current block. Video encoder <NUM> (e.g., via mode selection unit <NUM>) may adjust the degree of quantization applied to the coefficient blocks associated with the current block by adjusting the QP value associated with the CU. Quantization may introduce loss of information, and thus, quantized transform coefficients may have lower precision than the original transform coefficients produced by transform processing unit <NUM>.

Filter unit <NUM> may perform one or more filter operations on reconstructed blocks. For example, filter unit <NUM> may perform deblocking operations to reduce blockiness artifacts along edges of CUs. Operations of filter unit <NUM> may be skipped, in some examples.

Video encoder <NUM> stores reconstructed blocks in DPB <NUM>. For instance, in examples where operations of filter unit <NUM> are not needed, reconstruction unit <NUM> may store reconstructed blocks to DPB <NUM>. In examples where operations of filter unit <NUM> are needed, filter unit <NUM> may store the filtered reconstructed blocks to DPB <NUM>. Motion estimation unit <NUM> and motion compensation unit <NUM> may retrieve a reference picture from DPB <NUM>, formed from the reconstructed (and potentially filtered) blocks, to inter-predict blocks of subsequently encoded pictures. In addition, intra-prediction unit <NUM> may use reconstructed blocks in DPB <NUM> of a current picture to intra-predict other blocks in the current picture.

In some examples, operations performed with respect to a luma coding block need not be repeated for the chroma coding blocks. As one example, operations to identify a motion vector (MV) and reference picture for a luma coding block need not be repeated for identifying a MV and reference picture for the chroma blocks. Rather, the MV for the luma coding block may be scaled to determine the MV for the chroma blocks, and the reference picture may be the same. As another example, the intra-prediction process may be the same for the luma coding blocks and the chroma coding blocks.

Video encoder <NUM> represents an example of a device configured to encode video data including a memory configured to store video data, and one or more processing units implemented in circuitry and configured to perform any of the techniques of this disclosure as part of a decoding loop of a video encoding process. For instance, in a decoding loop of a video encoding process, video encoder <NUM> may be configured to determine that a block if video data is coded using an intra prediction mode. Video encoder <NUM> may also be configured to filter a sample of a block of video data to determine a filtered value. Video encoder <NUM> may further be configured to determine that the filtered value comprises an out-of-range value. In response to determining that the filtered value comprises the out-of-range value, video encoder <NUM> may also be configured to perform a clipping operation on the out-of-range value.

In some instances, in determining that the filtered value comprises the out-of-range value, video encoder <NUM> may be configured to determine that the filtered value is less than <NUM>. Further, in performing the clipping operation on the out-of-range value, video encoder <NUM> may be configured to set the filtered value to <NUM>.

In some instances, in determining that the filtered value comprises the out-of-range value, video encoder <NUM> may be configured to determine that the filtered value is greater than a maximum value. Further, in performing the clipping operation on the out-of-range value, video encoder <NUM> may be configured to set the filtered value to the maximum value.

In some instances, video encoder <NUM> may be further configured to determine that the block of video data is coded using multiple reference lines for the intra prediction mode. Further, video encoder <NUM> may be configured to perform the clipping operation for a filtered sample from each line of the multiple reference lines.

In some instances, in filtering the sample, video encoder <NUM> may be configured to perform cubic filtering on the sample.

In accordance with the techniques of this disclosure, in a decoding loop of a video encoding process, video encoder <NUM> is configured to determine that a block of video data is coded using an intra prediction mode PDPC and, when the intra prediction mode belongs to a subset of intra prediction modes, predict the block of video data using unfiltered reference samples as PDPC-reference samples.

In accordance with the techniques of this disclosure, in a decoding loop of a video encoding process, video encoder <NUM> may be configured to determine that a block of video data is coded using an intra prediction mode with PDPC. Video encoder <NUM> may be configured to, in response to the intra prediction mode being a particular intra prediction mode, filter reference samples and predict the block of video data using the filtered reference samples as PDPC-reference samples.

In some instances, the reference samples may be a sample from a line of samples to the left of the block and a sample from a line of samples above the block. In some instances, the intra prediction mode being the particular intra prediction mode may include the intra prediction mode being a planar mode. In some instances, the intra prediction mode being the particular intra prediction mode may include the intra prediction mode belonging to a subset of intra prediction modes, where the subset is fewer than all intra prediction modes supported for the video data.

In accordance with the techniques of this disclosure, in a decoding loop of a video encoding process, video encoder <NUM> may be configured to determine that a block of video data is coded using an intra prediction mode with PDPC. Video encoder <NUM> may be configured to further determine whether to filter reference samples based on one or more criteria. In response to determining to filter the reference samples, video encoder <NUM> may be configured to predict the block of video data using filtered reference samples as PDPC-reference samples.

In some instances, the one or more criteria includes a size of the block, a tree structure for the block, a distance from a block boundary, the block being more than a certain width, the block being more than a certain height, or any combination or permutation thereof.

In accordance with the techniques of this disclosure, in a decoding loop of a video encoding process, video encoder <NUM> may be configured to determine that a block of video data is coded using an intra prediction mode with PDPC. Video encoder <NUM> may also be configured to apply a first filter to obtain PDPC-reference samples and apply a second filter to obtain reference samples for prediction, wherein the first filter is a different filter than the second filter.

In some instances, in addition to any of the techniques described above, video encoder <NUM> may be configured to store the video data in a memory of a wireless communication device, process the video data on one or more processors of the wireless communication device, and transmit the video data from a transmitter of the wireless communication device. In some examples, the wireless communication device may be a telephone handset, and transmitting the video data at the transmitter of the wireless communication device may include modulating, according to a wireless communication standard, a signal comprising the video data.

<FIG> is a block diagram illustrating an example video decoder <NUM> that may perform the techniques of this disclosure. <FIG> 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 video decoder <NUM> is described according to the techniques of JEM and HEVC. However, the techniques of this disclosure may be performed by video coding devices that are configured to other video coding standards.

In the example of <FIG>, video decoder <NUM> includes coded picture buffer (CPB) memory <NUM>, entropy decoding unit <NUM>, prediction processing unit <NUM>, inverse quantization unit <NUM>, inverse transform processing unit <NUM>, reconstruction unit <NUM>, filter unit <NUM>, and decoded picture buffer (DPB) <NUM>. Prediction processing unit <NUM> includes motion compensation unit <NUM> and intra-prediction unit <NUM>. Prediction processing unit <NUM> may include addition units to perform prediction in accordance with other prediction modes. As examples, prediction processing unit <NUM> may include a palette unit, an intra-block copy unit (which may form part of motion compensation unit <NUM>), an affine unit, a linear model (LM) unit, or the like. In other examples, video decoder <NUM> may include more, fewer, or different functional components.

CPB memory <NUM> may store video data, such as an encoded video bitstream, to be decoded by the components of video decoder <NUM>. The video data stored in CPB memory <NUM> may be obtained, for example, from computer-readable medium <NUM> (<FIG>). CPB memory <NUM> may include a CPB that stores encoded video data (e.g., syntax elements) from an encoded video bitstream. Also, CPB memory <NUM> may store video data other than syntax elements of a coded picture, such as temporary data representing outputs from the various units of video decoder <NUM>. DPB <NUM> generally stores decoded pictures, which video decoder <NUM> may output and/or use as reference video data when decoding subsequent data or pictures of the encoded video bitstream. CPB memory <NUM> and DPB <NUM> may be formed by any of a variety of memory devices, such as DRAM, including SDRAM, MRAM, RRAM, or other types of memory devices. CPB memory <NUM> and DPB <NUM> may be provided by the same memory device or separate memory devices. In various examples, CPB memory <NUM> may be on-chip with other components of video decoder <NUM>, or off-chip relative to those components.

Additionally or alternatively, in some examples, video decoder <NUM> may retrieve coded video data from memory <NUM> (<FIG>). That is, memory <NUM> may store data as discussed above with CPB memory <NUM>. Likewise, memory <NUM> may store instructions to be executed by video decoder <NUM>, when some or all of the functionality of video decoder <NUM> is implemented in software to executed by processing circuitry of video decoder <NUM>.

The various units shown in <FIG> are illustrated to assist with understanding the operations performed by video decoder <NUM>. The units may be implemented as fixed-function circuits, programmable circuits, or a combination thereof. Similar to <FIG>, fixed-function circuits refer to circuits that provide particular functionality, and are preset on the operations that can be performed. Programmable circuits refer to circuits that can programmed to perform various tasks, and provide flexible functionality in the operations that can be performed. For instance, programmable circuits may 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 may 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, the one or more of the units may be distinct circuit blocks (fixed-function or programmable), and in some examples, the one or more units may be integrated circuits.

After inverse quantization unit <NUM> forms the transform coefficient block, inverse transform processing unit <NUM> may 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 <NUM> may apply an inverse DCT, an inverse integer transform, an inverse Karhunen-Loeve transform (KLT), an inverse rotational transform, an inverse directional transform, or another inverse transform to the coefficient block.

Filter unit <NUM> may perform one or more filter operations on reconstructed blocks. For example, filter unit <NUM> may perform deblocking operations to reduce blockiness artifacts along edges of the reconstructed blocks. Operations of filter unit <NUM> are not necessarily performed in all examples.

Video decoder <NUM> may store the reconstructed blocks in DPB <NUM>. As discussed above, DPB <NUM> may provide reference information, such as samples of a current picture for intra-prediction and previously decoded pictures for subsequent motion compensation, to prediction processing unit <NUM>. Moreover, video decoder <NUM> may output decoded pictures from DPB for subsequent presentation on a display device, such as display device <NUM> of <FIG>.

In this manner, video decoder <NUM> represents an example of a video decoding device including a memory configured to store video data, and one or more processing units implemented in circuitry and configured to determine that a block if video data is coded using an intra prediction mode. Video decoder <NUM> may also be configured to filter a sample of a block of video data to determine a filtered value. Video decoder <NUM> may further be configured to determine that the filtered value comprises an out-of-range value. In response to determining that the filtered value comprises the out-of-range value, video decoder <NUM> may also be configured to perform a clipping operation on the out-of-range value.

In some instances, in determining that the filtered value comprises the out-of-range value, video decoder <NUM> may be configured to determine that the filtered value is less than <NUM>. Further, in performing the clipping operation on the out-of-range value, video decoder <NUM> may be configured to set the filtered value to <NUM>.

In some instances, in determining that the filtered value comprises the out-of-range value, video decoder <NUM> may be configured to determine that the filtered value is greater than a maximum value. Further, in performing the clipping operation on the out-of-range value, video decoder <NUM> may be configured to set the filtered value to the maximum value.

In some instances, video decoder <NUM> may be further configured to determine that the block of video data is coded using multiple reference lines for the intra prediction mode. Further, video decoder <NUM> may be configured to perform the clipping operation for a filtered sample from each line of the multiple reference lines.

In some instances, in filtering the sample, video decoder <NUM> may be configured to perform cubic filtering on the sample.

In accordance with the techniques of this disclosure, video decoder <NUM> is configured to determine that a block of video data is coded using an intra prediction mode with PDPC and, when the intra prediction mode belongs to a subset of intra prediction modes, predict the block of video data using unfiltered reference samples as PDPC-reference samples.

In accordance with the techniques of this disclosure, video decoder <NUM> is configured to determine that a block of video data is coded using an intra prediction mode with PDPC. Video decoder <NUM> may be configured to, in response to the intra prediction mode being a particular intra prediction mode not belonging to the subset of intra prediction modes, filter reference samples and predict the block of video data using the filtered reference samples as PDPC-reference samples.

In accordance with the techniques of this disclosure, video decoder <NUM> is be configured to determine that a block of video data is coded using an intra prediction mode with PDPC. Video decoder <NUM> may be configured to further determine whether to filter reference samples based on one or more criteria in addition to the intra prediction mode not belonging to a subset of intra prediction modes. In response to determining to filter the reference samples, video decoder <NUM> may be configured to predict the block of video data using filtered reference samples as PDPC-reference samples.

In some instances, the one or more additional criteria includes a size of the block, a tree structure for the block, a distance from a block boundary, the block being more than a certain width, the block being more than a certain height, or any combination or permutation thereof.

In accordance with the techniques of this disclosure, video decoder <NUM> may be configured to determine that a block of video data is coded using an intra prediction mode with PDPC. When the intra prediction mode does not belong to the subset of intra prediction modes, video decoder <NUM> may be configured to apply a first filter to obtain PDPC-reference samples and apply a second filter to obtain reference samples for prediction, wherein the first filter is a different filter than the second filter.

In some instances, in addition to the techniques described above, video decoder <NUM> may receive the video data at a receiver of a wireless communication device, store the video data in a memory of the wireless communication device, and process the video data on one or more processors of the wireless communication device. In some examples, the wireless communication device is a telephone handset and receiving the video data may include demodulating, according to a wireless communication standard, a signal comprising the video data.

Video coding standards include ITU-T H. <NUM>, ISO/IEC MPEG-<NUM> Visual, ITU-T H. <NUM> or ISO/IEC MPEG-<NUM> Visual, ITU-T H. <NUM>, ISO/IEC MPEG-<NUM> Visual, ITU-T H. <NUM> (also known as ISO/IEC MPEG-<NUM> AVC), including 'its Scalable Video Coding (SVC) and Multiview Video Coding (MVC) extensions and ITU-T H. <NUM> (also known as ISO/IEC MPEG-<NUM> HEVC) with its extensions. During the April <NUM> meeting of the Joint Video Experts Team (JVET), the Versatile Video Coding standardization activity (also known as ITU-T H. <NUM>) was kicked off with the evaluation of the video compression technologies submitted to the Call for Proposals. Video encoder <NUM> and video decoder <NUM> may operate in accordance with a H. <NUM> video coding standard, or another codec.

If coding video according to HEVC, then video encoder <NUM> and video decoder <NUM> are configured to potentially filter the neighboring reference samples, before intra prediction, using a <NUM>-tap linear or <NUM>-tap (<NUM>,<NUM>,<NUM>)/<NUM> filter. This process is known as intra reference smoothing, or mode-dependent intra smoothing (MDIS). In MDIS, given the intra prediction mode index predModeIntra and block size nTbS, a video coder (e.g., a video encoder or video decoder) decides whether the reference smoothing process is to be performed and, if so, which smoothing filter is used. The following text is the related text from the HEVC specification:.

Outputs of this process are the filtered samples pF[ x ][ y ], with x = -<NUM>, y = -<NUM>. nTbS * <NUM> - <NUM> and x = <NUM>. nTbS * <NUM> - <NUM>, y = -<NUM>.

The variable filterFlag is derived as follows:.

- If one or more of the following conditions are true, filterFlag is set equal to <NUM>:.

- The variable minDistVerHor is set equal to Min( Abs( predModeIntra - <NUM> ), Abs( predModeIntra - <NUM> ) ). - The variable intraHorVerDistThres[ nTbS ] is specified in Table <NUM>-<NUM>. - The variable filterFlag is derived as follows:.

- If minDistVerHor is greater than intraHorVerDistThres[ nTbS ], filterFlag is set equal to <NUM>. - Otherwise, filterFlag is set equal to <NUM>.

When filterFlag is equal to <NUM>, the following applies:.

During the Joint Video Exploration Team (JVET) activities, the JEM <NUM> was defined and the following version of the MDIS table was included for luma blocks:.

The block size index is defined as follows in JEM7:<MAT>.

Whether to apply the [<NUM><NUM><NUM>]/<NUM> smoothing filter to the intra reference samples is determined as follows:<MAT>.

In the equation above, HOR_IDX = <NUM> and VER_IDX = <NUM> because JEM <NUM> has <NUM> directional intra modes (IntraModeIdx <NUM>-<NUM>) in addition to planar (IntraModeIdx = <NUM>) and DC (IntraModeIdx = <NUM>) modes. The following condition determines whether to apply the smoothing filter: <MAT>.

In the Joint Video Experts Team (JVET) and its VVC Test Model version <NUM> (VTM) and Benchmark Model version <NUM> (BMS <NUM>) software, the following MDIS table is included:.

The block size index is defined as follows in VTM1 and BMS1:<MAT>.

Video encoder <NUM> and video decoder <NUM> determine whether to apply the [<NUM><NUM><NUM>]/<NUM> smoothing filter to the intra reference samples as follows: <MAT>.

In the equation above, HOR_IDX = <NUM> and VER_IDX = <NUM> because VTM1 and BMS1 have <NUM> directional intra modes (IntraModeIdx <NUM>-<NUM>) in addition to planar (IntraModeIdx = <NUM>) and DC (IntraModeIdx = <NUM>) modes.

In HEVC, a two-tap linear interpolation filter is used to generate the intra prediction block in the directional prediction modes (i.e., excluding the planar and DC predictors). In JEM <NUM> (<NPL>, hereinafter, "JEM <NUM>") and <NPL>, hereinafter, "BMS1" or VTM1), four-tap intra interpolation filters are used for directional intra prediction filtering. Two types of four-tap interpolation filters are used:.

The following <NUM>-tap cubic (<NUM>-phase) interpolation filter is employed in JEM7 and BMS1:
<MAT>.

The following <NUM>-tap Gaussian filter (<NUM>-phase) is employed in JEM7 and BMS1:
<MAT>
<MAT>.

The Gaussian interpolation filter can be derived with the following example Matlab code. In this example, the smoothing strength sigma is set to <NUM>:.

In another example, the following <NUM>-tap interpolation filter (<NUM>-phase) can be used instead of <NUM>-tap:
<MAT>
<MAT>.

In another example, the following <NUM>-tap cubic interpolation filter can be used (<NUM>-phase):
<MAT>.

<FIG> are conceptual diagrams illustrating intra prediction concepts using multiple reference lines and PDPC, in accordance with the techniques of this disclosure. <FIG> shows an example where the intra prediction angle is represented by either line <NUM> or <NUM>. In such an instance, the PDPC sample is on the other side of the intra prediction angle. That is, if the intra direction mode is line <NUM>, then line <NUM> represents the PDPC samples, and vice versa. In other examples, the PDPC reference samples may be represented by line <NUM> (in addition to the other sample), depending on the mode and the specific implementation of PDPC used.

Some implementations of PDPC use three samples: top, left and top-left. <FIG> show examples of what those three samples may be. <FIG> shows the three samples used for PDPC when the intra prediction direction is one of line <NUM> or <NUM>. <FIG>, shows the three samples used for PDPC when the intra prediction mode is horizontal (line <NUM>) or vertical (line <NUM>) or planar or DC.

According to an example technique of this disclosure, video encoder <NUM> and video decoder <NUM> may utilize MRL to combine pixels, potentially interpolated, from two or more lines (e.g., weighted average, or non-linear combination) to obtain a prediction of the intra block samples corresponding with an intra prediction mode (e.g., DC, planar, HOR/VER, directional) or to obtain a reference line which is then used for prediction of the samples.

According to another example technique of this disclosure, video encoder <NUM> and video decoder <NUM> may utilize MRL to select one or multiple of the lines from the neighborhood as reference line(s) for the prediction and potentially signal the selection in the bitstream to inform the decoder or deriving the selection from available data such as the intra prediction mode.

The cubic interpolation filter described above contains negative tap coefficients, which may lead to out-of-range values. When MRL is used, a cubic filter may be applied to more than one line and the reference sample may be obtained by combining (e.g. weighted average) the filtered samples from each line. In such cases, performing a clipping operation after combining the samples may result in amplifying errors that may occur due to out-of-range values.

Further, PDPC uses the samples from the top reference line and the left reference line (referred to as PDPC-reference samples henceforth) and uses a weighted average with the directional/DC/PL-predicted samples to obtain a more efficient intra prediction block. The sample from the top reference line or the left reference line (the reference line may be averaged or may be obtained from one of several candidate lines) may or may not be filtered. Under MDIS filtering conditions (e.g. for certain modes), in some cases PDPC-reference samples may be filtered using the [<NUM><NUM><NUM>] filter; in other cases no filtering may be applied. This results in inferior coding efficiency performance.

In accordance with the techniques of this disclosure, video encoder <NUM> and video decoder <NUM> may be configured to perform a clipping operation for a filtered sample value that is obtained by using the cubic filter. When MRL is used, the clipping operation may be performed for the filtered sample from each line. The clipped samples may be combined or used as such for generating the reference samples. For example, for a <NUM>-bit video content, or content (e.g. <NUM>-bit) that is being processed by a codec that has internal processing of samples at <NUM> bits, the clipping operation of a sample x, where x is obtained by applying the cubic filter on one or more reconstructed samples, is performed as follows:
if x < <NUM>
x = <NUM>
else if x > <NUM>
x = <NUM>
else {} // x is not changed.

It is to be understood that the above techniques also apply for other types of clipping operations, and also when the reconstructed samples are processed before applying the cubic filter. The invention also applies to cases where filters other than a cubic filter may be used, which may lead to out-of-range filtered sample values.

When using multiple reference lines, video encoder <NUM> and video decoder <NUM>, when the intra prediction mode belongs to a subset of intra prediction modes, is configured to use unfiltered reference samples as the PDPC-reference samples. In one example, video encoder <NUM> and video decoder <NUM> may be configured to obtain PDPC-reference samples by filtering only for the Planar mode. For example, video encoder <NUM> and video decoder <NUM> may be configured to perform filter only for Planar mode and modes whose ID values are within a certain offset from the diagonal modes (e.g., <NUM> and DIA).

In some examples, the choice of filter used to obtain the PDPC-reference samples may be different from the filters used to obtain the reference samples for prediction. This filter may be fixed or may be signaled in the bitstream to the decoder. For example, video encoder <NUM> and video decoder <NUM> may be configured to obtain the PDPC reference samples by applying a longer tap filter or using a bilateral filter. In other examples, video encoder <NUM> and video decoder <NUM> may be configured to use a filter with coefficients [<NUM><NUM><NUM> ]/<NUM> for filtering reference samples for intra prediction and use a longer filter with coefficients [<NUM><NUM><NUM><NUM><NUM>]/<NUM> for PDPC reference samples.

In some examples, the applicability of filtering may further depend on the block size, tree structure, distance from the picture of block boundary, etc. For instance, video encoder <NUM> and video decoder <NUM> may be configured to only apply the filtering for blocks that are more than a certain width and/or height as filtering on small blocks may result in loss of detail.

According to the techniques of this disclosure, video encoder <NUM> or video decoder <NUM> is configured to perform intra prediction with PDPC as follows. For a sample at a position, video encoder <NUM> or video decoder <NUM> is configured to derive the intra prediction mode using reference samples. For each position, (and the mode used for prediction), video encoder <NUM> and video decoder <NUM> is configured to determine locations for PDPC reference samples, with the positions for the reference samples being based on the intra prediction mode and reference line. If the location is an integer position, then no interpolation is required, but for other positions, video encoder <NUM> and video decoder <NUM> may perform interpolation. For the interpolation, video encoder <NUM> and video decoder <NUM> may use filtered or unfiltered reference samples. Thus, the reference samples used for regular prediction may be either filtered or unfiltered, and the reference samples used for PDPC are unfiltered when the intra prediction mode belongs to a subset of intra prediction modes or filtered in other intra prediction modes not belonging to the subset of intra prediction modes. The filtering or not filtering of the reference samples used for regular prediction is disassociated from the filtering or not filtering of the PDPC reference samples.

<FIG> is a flowchart illustrating an example process for encoding a current block. The current block may comprise a current CU. Although described with respect to video encoder <NUM> (<FIG> and <FIG>), it should be understood that other devices may be configured to perform a method similar to that of <FIG>.

In this example, video encoder <NUM> initially predicts the current block (<NUM>). For example, video encoder <NUM> may form a prediction block for the current block. Video encoder <NUM> may then calculate a residual block for the current block (<NUM>). To calculate the residual block, video encoder <NUM> may calculate a difference between the original, uncoded block and the prediction block for the current block. Video encoder <NUM> may then transform and quantize coefficients of the residual block (<NUM>). Next, video encoder <NUM> may scan the quantized transform coefficients of the residual block (<NUM>). During the scan, or following the scan, video encoder <NUM> may entropy encode the coefficients (<NUM>). For example, video encoder <NUM> may encode the coefficients using CAVLC or CABAC. Video encoder <NUM> may then output the entropy coded data of the block (<NUM>).

<FIG> is a flowchart illustrating an example process for decoding a current block of video data. The current block may comprise a current CU. Although described with respect to video decoder <NUM> (<FIG> and <FIG>), it should be understood that other devices may be configured to perform a method similar to that of <FIG>.

Video decoder <NUM> may receive entropy coded data for the current block, such as entropy coded prediction information and entropy coded data for coefficients of a residual block corresponding to the current block (<NUM>). Video decoder <NUM> may entropy decode the entropy coded data to determine prediction information for the current block and to reproduce coefficients of the residual block (<NUM>). Video decoder <NUM> may predict the current block (<NUM>), e.g., using an intra- or inter-prediction mode as indicated by the prediction information for the current block, to calculate a prediction block for the current block. Video decoder <NUM> may then inverse scan the reproduced coefficients (<NUM>), to create a block of quantized transform coefficients. Video decoder <NUM> may then inverse quantize and inverse transform the coefficients to produce a residual block (<NUM>). Video decoder <NUM> may ultimately decode the current block by combining the prediction block and the residual block (<NUM>).

<FIG> is a flowchart illustrating an example process for decoding a current block of video data. The techniques of <FIG> will be described with reference to a generic video decoder, which may, for example, be a device such as video decoder <NUM>. The generic video decoder, however, may also correspond to the decoding loop of video encoder <NUM>. As part of encoding video data, a video encoder also decodes the video data in order to maintain the same decoded picture buffer maintained by a video decoder and as part of making decisions regarding how to encode the video data, such as prediction mode decisions and decisions related to what coding tools to enable or disable.

The video decoder determines that a block of video data is coded using an intra prediction mode with PDPC (<NUM>). In response to the intra prediction mode being a particular intra prediction mode not belonging to a subset of intra prediction modes, the video decoder applies a first filter to a first sample in a first reference line to obtain a first PDPC reference sample value (<NUM>). In response to the intra prediction mode being the particular intra prediction mode, the video decoder applies a second filter to a second sample in a second reference line to obtain a second PDPC reference sample value (<NUM>).

In some examples, the particular intra prediction mode may be the planar mode.

The first reference line may, for example, be a line of samples to the left of the block, and the second reference line may be a line of samples above the block. The first reference line may be a line of samples to the left of the block that is not adjacent to the block, and the second reference line may be a line of samples above the block that is not adjacent to the block. The video decoder may determine the first PDPC reference sample value from multiple reference lines above the block, and additionally or alternatively, determine the second PDPC reference sample value from multiple reference lines to the left of the block.

The video decoder determines a predicted reference sample value based on the intra prediction mode (<NUM>). The predicted reference sample value may be a value for an unfiltered reference sample. The video decoder predicts a sample of the block of video data based on the predicted reference sample value, the first PDPC reference sample value, and the second PDPC reference sample value (<NUM>). To predict the sample of the block of video data based on the predicted sample value, the first PDPC reference sample value, and the second PDPC reference sample value, the video decoder may be configured to set a value for the sample of the block to a weighted average of the predicted reference sample value, the first PDPC reference sample value, and the second PDPC reference sample.

The video decoder may output a predictive block of video data that includes the predicted sample. As described elsewhere in this disclosure, that predictive block may be combined with other predictive blocks and residual blocks to form reconstructed blocks, and the reconstructed blocks may be filtered to generate decoded picture of video data. At a video encoder, the decoded pictures may be stored in a coded picture buffer and used to predict blocks for subsequent picture of video data. At a video decoder, the decoded pictures may be stored in a decoded picture buffer and used to predict blocks for subsequent picture of video data and may also be output for display.

Instructions may be executed by one or more processors, such as one or more DSPs, general purpose microprocessors, application specific integrated circuits ASICs, FPGAs, or other equivalent integrated or discrete logic circuitry.

Claim 1:
A method of decoding video data, the method comprising:
determining (<NUM>) that a block of video data is coded using an intra prediction mode with position dependent intra prediction combination, PDPC;
determining a first predicted reference sample value of the block based on the intra prediction mode;
in response to determining that the intra prediction mode belongs to a first subset of intra prediction modes, the first subset comprising fewer than all intra prediction modes supported for the video data and either comprising only planar mode or comprising only planar mode and intra prediction modes whose ID values are within a certain offset from the diagonal modes, determining PDPC reference samples by:
applying a first filter to a first sample in a first reference line to obtain a first PDPC reference sample value; and
applying a second filter to a second sample in a second reference line to obtain a second PDPC reference sample value; or
in response to determining that the intra prediction mode belongs to a second subset of intra prediction modes, wherein the second subset comprises the intra prediction modes supported for the video data which are not included in the first subset, determining PDPC reference samples by:
using a first unfiltered reference sample in a first reference line for the block as a first PDPC reference sample value for the block; and
using a second unfiltered reference sample in a second reference line for the block as a second PDPC reference sample value for the block;
and
determining (<NUM>), using PDPC, a second predicted sample value of the block of video data, the determining based on the first predicted reference sample value, the first PDPC reference sample value, and the second PDPC reference sample value.