Patent Description:
Encoding based on spatial similarities may be performed by breaking a frame or image into blocks that are predicted based on other blocks within the same frame or image. Differences (i.e., residual errors) between blocks and prediction blocks are compressed and encoded in a bitstream. A decoder uses the differences and the reference frames to reconstruct the frames or images.

Document <CIT> relates to an image encoding/decoding method.

There is a need to improve the efficiency of such encoding processes, especially in terms of required computing resources and necessary bandwidth and storage requirements. Accordingly, disclosed herein are aspects, features, elements, and implementations for encoding and decoding blocks using directional intra prediction.

One aspect of the disclosed implementations is a method for coding a current block using an intra-prediction mode, the intra-prediction mode including a prediction angle according to appended claims <NUM> to <NUM>.

Therefore, the encoding efficiency can be improved.

Another aspect is an apparatus, including a memory and a processor, for encoding or decoding a current block using an intra-prediction mode according to appended claims <NUM> to <NUM>.

It should be noted that any feature described above may be used with any particular aspect or embodiment of the invention.

These and other aspects of the present disclosure are disclosed in the following detailed description of the embodiments, the appended claims and the accompanying figures.

The description herein makes reference to the accompanying drawings wherein like reference numerals refer to like parts throughout the several views.

As mentioned above, compression schemes related to coding video streams may include breaking images into blocks and generating a digital video output bitstream (i.e., an encoded bitstream) using one or more techniques to limit the information included in the output bitstream. A received bitstream can be decoded to re-create the blocks and the source images from the limited information. Encoding a video stream, or a portion thereof, such as a frame or a block, can include using spatial similarities in the video stream to improve coding efficiency. For example, a current block of a video stream may be encoded based on identifying a difference (residual) between the previously coded pixel values, or between a combination of previously coded pixel values, and those in the current block.

Encoding using spatial similarities can be known as intra prediction. Intra prediction attempts to predict the pixel values of a current block of a frame of a video stream using pixels peripheral to the current block; that is, using pixels that are in the same frame as the current block but that are outside the boundaries of the current block. Intra prediction can be performed along a direction of prediction, referred to herein as prediction angle, where each direction can correspond to an intra-prediction mode. An intra-prediction mode can use pixels peripheral to the current block being predicted. Pixels peripheral to the current block are pixels outside the current block. Pixels peripheral to the current block may be pixels that contact a boundary of the current block. The intra-prediction mode can be signalled by an encoder to a decoder.

Many different intra-prediction modes can be supported. Some intra-prediction modes use a single value for all pixels within the prediction block generated using at least one of the peripheral pixels. Others are referred to as directional intra-prediction modes, which each have a corresponding prediction angle. Intra-prediction modes can include, for example, horizontal intra-prediction mode, vertical intra-prediction mode, and various other directional intra-prediction modes. As such, the prediction angle can be any angle between <NUM> and <NUM> degrees. In some implementations, the prediction angle can be any angle between <NUM> and <NUM> degrees. Available prediction angles can also be a subset of all possible prediction angles. For example, a codec can have available prediction modes corresponding to <NUM> to <NUM> prediction angles between <NUM> and <NUM> degrees.

Various directional intra-prediction modes can be used to propagate pixel values from previously-coded blocks along an angular line (including horizontal, vertical, and directions offset from the horizontal and/or the vertical) to predict a block. That is, the current block can be predicted by projecting reference pixels from peripheral pixels to form a prediction block. The peripheral pixels can include pixels to the left of and above (i.e., top) boundaries of the current block, in a certain angle or direction that can be offset from the horizontal and the vertical lines. The reference pixels can be, for example, actual pixel values of the peripheral pixels or average pixel values (such as weighted average) of some of the peripheral pixels, which are propagated in angular directions to form the prediction block. The peripheral pixels can be combined in other ways to generate the reference pixels.

<FIG> are diagrams of directional intra-prediction modes according to implementations of this disclosure. Directional intra-prediction modes may also be referred to as directional prediction modes herein. A directional prediction mode <NUM> illustrates an intra-prediction mode having a prediction angle between <NUM> and <NUM> degrees. Such intra-prediction modes may be referred to as belonging to Zone <NUM>. A directional prediction mode <NUM> illustrates an intra-prediction mode having a prediction angle between <NUM> and <NUM> degrees. Such intra-prediction modes may be referred to as belonging to Zone <NUM>. A directional prediction mode <NUM> illustrates an intra1prediction mode having a prediction angle between <NUM> and <NUM> degrees. Such intra-prediction modes may be referred to as belonging to Zone <NUM>. Each of the illustrated directional prediction modes <NUM>-<NUM> may be used to generate a prediction block having dimensions conforming to a current block <NUM>.

<FIG> also illustrate first pixels <NUM> in a row above the current block and second pixels <NUM> in a column to the left of the current block. A top-left pixel <NUM> is also illustrated. The first pixels <NUM>, the second pixels <NUM>, and the top-left pixel <NUM> can be used to generate the prediction block. In some implementations, directional predictions in Zone <NUM> (i.e., intra-prediction modes having prediction angles between <NUM> and <NUM>) use the first pixels <NUM> but may not use the second pixels <NUM> to generate the prediction block; directional predictions in Zone <NUM> (i.e., intra-prediction modes having prediction angles between <NUM> and <NUM>) use the first pixels <NUM>, the second pixels <NUM>, and the top-left pixel <NUM> to generate the prediction block; and directional predictions in Zone <NUM> (i.e., intra-prediction modes having prediction angles between <NUM> and <NUM>) use the second pixels <NUM> but may not use the first pixels <NUM> to generate the prediction block.

<FIG> is a diagram of an intra-prediction mode having a <NUM>-degree prediction angle according to implementations of this disclosure. <FIG> illustrates generating a prediction block <NUM> for a 4x4 block to be predicted (also called a current block) and corresponds to a directional prediction in Zone <NUM> (i.e., the directional prediction mode <NUM>) of <FIG>. The intra-prediction mode of <FIG> propagates peripheral pixels A through D down the columns of the prediction block <NUM> such that each pixel in a column has its value set equal to that of the adjacent peripheral pixel A through D in the direction of the arrows.

<FIG> is a diagram of an intra-prediction mode having a <NUM>-degree prediction angle according to implementations of this disclosure. <FIG> illustrates generating a prediction block <NUM> for a 4x4 current block and corresponds to a directional prediction in Zone <NUM> of <FIG>. The intra-prediction mode of <FIG> propagates peripheral pixel values along a <NUM>-degree line (i.e., lines <NUM>) to the right and down to form the prediction block <NUM>. The peripheral pixel values can include, for example, some of peripheral pixels <NUM> (i.e., pixels A through R) from blocks adjacent to the 4x4 current block of a frame to form the prediction block <NUM> for the current block. Although the <NUM>-degree intra-prediction mode in <FIG> is illustrated using the pixel values of the peripheral pixels <NUM> to generate the prediction block <NUM>, for example, a linear combination (e.g., weighted average) of some (e.g., two, three, or more) of the peripheral pixels can be used to predict pixel values of the prediction block <NUM> along lines extending through the block. For example, the pixel value that is propagated along one of the lines <NUM> for the pixel location <NUM> can be formed from an (e.g., weighted) average of pixel values K, L, and M.

The pixels of some video signals (e.g., signals of a high definition video or a <NUM> video) have relatively smooth gradients. As such, these video signals may not include many high frequency components. Rather, low frequency components mainly constitute such video signals. Intra-prediction modes having sharp prediction angles can result in higher frequencies in the prediction signal that, in turn, can result in high frequency distortions.

Implementations of this disclosure can improve video compression and/or reduce distortions using intra-prediction edge filtering. As indicated above, an intra-prediction mode uses pixels peripheral to the current block. Intra-prediction edge filtering can eliminate distortions by applying (e.g.. , low-pass) filters to at least some of the pixels peripheral to the current block, resulting in modified pixels, and using the modified pixels to generate a prediction block.

Details are described herein after first describing an environment in which the intra-prediction edge filtering disclosed herein may be implemented.

<FIG> is a schematic of a video encoding and decoding system <NUM>. A transmitting station <NUM> can be, for example, a computer having an internal configuration of hardware such as that described in <FIG>. However, other suitable implementations of the transmitting station <NUM> are possible. For example, the processing of the transmitting station <NUM> can be distributed among multiple devices.

A network <NUM> can connect the transmitting station <NUM> and a receiving station <NUM> for encoding and decoding of the video stream. Specifically, the video stream can be encoded in the transmitting station <NUM> and the encoded video stream can be decoded in the receiving station <NUM>. The network <NUM> can be, for example, the Internet. The network <NUM> can also be a local area network (LAN), wide area network (WAN), virtual private network (VPN), cellular telephone network or any other means of transferring the video stream from the transmitting station <NUM> to, in this example, the receiving station <NUM>.

The receiving station <NUM>, in one example, can be a computer having an internal configuration of hardware such as that described in <FIG>. However, other suitable implementations of the receiving station <NUM> are possible. For example, the processing of the receiving station <NUM> can be distributed among multiple devices.

Other implementations of the video encoding and decoding system <NUM> are possible. For example, an implementation can omit the network <NUM>. In another implementation, a video stream can be encoded and then stored for transmission at a later time to the receiving station <NUM> or any other device having memory. In one implementation, the receiving station <NUM> receives (e.g., via the network <NUM>, a computer bus, and/or some communication pathway) the encoded video stream and stores the video stream for later decoding. In an example implementation, a real-time transport protocol (RTP) is used for transmission of the encoded video over the network <NUM>. In another implementation, a transport protocol other than RTP may be used, e.g., a Hyper-Text Transfer Protocol (HTTP)-based video streaming protocol.

When used in a video conferencing system, for example, the transmitting station <NUM> and/or the receiving station <NUM> may include the ability to both encode and decode a video stream as described below. For example, the receiving station <NUM> could be a video conference participant who receives an encoded video bitstream from a video conference server (e.g., the transmitting station <NUM>) to decode and view and further encodes and transmits its own video bitstream to the video conference server for decoding and viewing by other participants.

<FIG> is a block diagram of an example of a computing device <NUM> that can implement a transmitting station or a receiving station. For example, the computing device <NUM> can implement one or both of the transmitting station <NUM> and the receiving station <NUM> of <FIG>. The computing device <NUM> can be in the form of a computing system including multiple computing devices, or in the form of a single computing device, for example, a mobile phone, a tablet computer, a laptop computer, a notebook computer, a desktop computer, and the like.

A CPU <NUM> in the computing device <NUM> can be a central processing unit. Alternatively, the CPU <NUM> can be any other type of device, or multiple devices, capable of manipulating or processing information now-existing or hereafter developed. Although the disclosed implementations can be practiced with a single processor as shown, e.g., the CPU <NUM>, advantages in speed and efficiency can be achieved using more than one processor.

A memory <NUM> in the computing device <NUM> can be a read-only memory (ROM) device or a random access memory (RAM) device in an implementation. Any other suitable type of storage device can be used as the memory <NUM>. The memory <NUM> can include code and data <NUM> that is accessed by the CPU <NUM> using a bus <NUM>. The memory <NUM> can further include an operating system <NUM> and application programs <NUM>, the application programs <NUM> including at least one program that permits the CPU <NUM> to perform the methods described here. For example, the application programs <NUM> can include applications <NUM> through N, which further include a video coding application that performs the methods described here. The computing device <NUM> can also include a secondary storage <NUM>, which can, for example, be a memory card used with a computing device <NUM> that is mobile. Because the video communication sessions may contain a significant amount of information, they can be stored in whole or in part in the secondary storage <NUM> and loaded into the memory <NUM> as needed for processing.

The computing device <NUM> can also include one or more output devices, such as a display <NUM>. The display <NUM> may be, in one example, a touch sensitive display that combines a display with a touch sensitive element that is operable to sense touch inputs. The display <NUM> can be coupled to the CPU <NUM> via the bus <NUM>. Other output devices that permit a user to program or otherwise use the computing device <NUM> can be provided in addition to or as an alternative to the display <NUM>. When the output device is or includes a display, the display can be implemented in various ways, including by a liquid crystal display (LCD), a cathode-ray tube (CRT) display or light emitting diode (LED) display, such as an organic LED (OLED) display.

The computing device <NUM> can also include or be in communication with an image-sensing device <NUM>, for example a camera, or any other image-sensing device <NUM> now existing or hereafter developed that can sense an image such as the image of a user operating the computing device <NUM>. The image-sensing device <NUM> can be positioned such that it is directed toward the user operating the computing device <NUM>. In an example, the position and optical axis of the image-sensing device <NUM> can be configured such that the field of vision includes an area that is directly adjacent to the display <NUM> and from which the display <NUM> is visible.

The computing device <NUM> can also include or be in communication with a sound-sensing device <NUM>, for example a microphone, or any other sound-sensing device now existing or hereafter developed that can sense sounds near the computing device <NUM>. The sound-sensing device <NUM> can be positioned such that it is directed toward the user operating the computing device <NUM> and can be configured to receive sounds, for example, speech or other utterances, made by the user while the user operates the computing device <NUM>.

Although <FIG> depicts the CPU <NUM> and the memory <NUM> of the computing device <NUM> as being integrated into a single unit, other configurations can be utilized. The operations of the CPU <NUM> can be distributed across multiple machines (each machine having one or more processors) that can be coupled directly or across a local area or other network. The memory <NUM> can be distributed across multiple machines such as a network-based memory or memory in multiple machines performing the operations of the computing device <NUM>. Although depicted here as a single bus, the bus <NUM> of the computing device <NUM> can be composed of multiple buses. Further, the secondary storage <NUM> can be directly coupled to the other components of the computing device <NUM> or can be accessed via a network and can comprise a single integrated unit such as a memory card or multiple units such as multiple memory cards. The computing device <NUM> can thus be implemented in a wide variety of configurations.

<FIG> is a diagram of an example of a video stream <NUM> to be encoded and subsequently decoded. The video stream <NUM> includes a video sequence <NUM>. At the next level, the video sequence <NUM> includes a number of adjacent frames <NUM>. While three frames are depicted as the adjacent frames <NUM>, the video sequence <NUM> can include any number of adjacent frames <NUM>. The adjacent frames <NUM> can then be further subdivided into individual frames, e.g., a frame <NUM>. At the next level, the frame <NUM> can be divided into a series of segments <NUM> or planes. The segments <NUM> can be subsets of frames that permit parallel processing, for example. The segments <NUM> can also be subsets of frames that can separate the video data into separate colors. For example, the frame <NUM> of color video data can include a luminance plane and two chrominance planes. The segments <NUM> may be sampled at different resolutions.

Whether or not the frame <NUM> is divided into the segments <NUM>, the frame <NUM> may be further subdivided into blocks <NUM>, which can contain data corresponding to, for example, 16x16 pixels in the frame <NUM>. The blocks <NUM> can also be arranged to include data from one or more segments <NUM> of pixel data. The blocks <NUM> can also be of any other suitable size such as 4x4 pixels, 8x8 pixels, 16x8 pixels, 8x16 pixels, 16x16 pixels or larger.

<FIG> is a block diagram of an encoder <NUM> according to implementations of this disclosure. The encoder <NUM> can be implemented, as described above, in the transmitting station <NUM> such as by providing a computer software program stored in memory, for example, the memory <NUM>. The computer software program can include machine instructions that, when executed by a processor such as the CPU <NUM>, cause the transmitting station <NUM> to encode video data in the manner described herein. The encoder <NUM> can also be implemented as specialized hardware included in, for example, the transmitting station <NUM>. The encoder <NUM> has the following stages to perform the various functions in a forward path (shown by the solid connection lines) to produce an encoded or compressed bitstream <NUM> using the video stream <NUM> as input: an intra/inter prediction stage <NUM>, a transform stage <NUM>, a quantization stage <NUM>, and an entropy encoding stage <NUM>. The encoder <NUM> may also include a reconstruction path (shown by the dotted connection lines) to reconstruct a frame for encoding of future blocks. In <FIG>, the encoder <NUM> has the following stages to perform the various functions in the reconstruction path: a dequantization stage <NUM>, an inverse transform stage <NUM>, a reconstruction stage <NUM>, and a loop filtering stage <NUM>. Other structural variations of the encoder <NUM> can be used to encode the video stream <NUM>.

When the video stream <NUM> is presented for encoding, the frame <NUM> can be processed in units of blocks. At the intralinter prediction stage <NUM>, a block can be encoded using intra-frame prediction (also called intra-prediction) or inter-frame prediction (also called inter-prediction), or a combination of both. In any case, a prediction block can be formed. In the case of intra-prediction, all or a part of a prediction block may be formed from samples in the current frame that have been previously encoded and reconstructed. In the case of inter-prediction, all or part of a prediction block may be formed from samples in one or more previously constructed reference frames determined using motion vectors.

Next, still referring to <FIG>, the prediction block can be subtracted from the current block at the intralinter prediction stage <NUM> to produce a residual block (also called a residual). The transform stage <NUM> transforms the residual into transform coefficients in, for example, the frequency domain using block-based transforms. Such block-based transforms include, for example, the Discrete Cosine Transform (DCT) and the Asymmetric Discrete Sine Transform (ADST). Other block-based transforms are possible. Further, combinations of different transforms may be applied to a single residual. In one example of application of a transform, the DCT transforms the residual block into the frequency domain where the transform coefficient values are based on spatial frequency. The lowest frequency (DC) coefficient at the top-left of the matrix and the highest frequency coefficient at the bottom-right of the matrix. It is worth noting that the size of a prediction block, and hence the resulting residual block, may be different from the size of the transform block. For example, the prediction block may be split into smaller blocks to which separate transforms are applied.

The quantization stage <NUM> converts the transform coefficients into discrete quantum values, which are referred to as quantized transform coefficients, using a quantizer value or a quantization level. For example, the transform coefficients may be divided by the quantizer value and truncated. The quantized transform coefficients are then entropy encoded by the entropy encoding stage <NUM>. Entropy coding may be performed using any number of techniques, including token and binary trees. The entropy-encoded coefficients, together with other information used to decode the block, which may include for example the type of prediction used, transform type, motion vectors and quantizer value, are then output to the compressed bitstream <NUM>. The information to decode the block may be entropy coded into block, frame, slice and/or section headers within the compressed bitstream <NUM>. The compressed bitstream <NUM> can also be referred to as an encoded video stream or encoded video bitstream, and the terms will be used interchangeably herein.

The reconstruction path in <FIG> (shown by the dotted connection lines) can be used to ensure that both the encoder <NUM> and a decoder <NUM> (described below) use the same reference frames and blocks to decode the compressed bitstream <NUM>. The reconstruction path performs functions that are similar to functions that take place during the decoding process that are discussed in more detail below, including dequantizing the quantized transform coefficients at the dequantization stage <NUM> and inverse transforming the dequantized transform coefficients at the inverse transform stage <NUM> to produce a derivative residual block (also called a derivative residual). At the reconstruction stage <NUM>, the prediction block that was predicted at the intralinter prediction stage <NUM> can be added to the derivative residual to create a reconstructed block. The loop filtering stage <NUM> can be applied to the reconstructed block to reduce distortion such as blocking artifacts.

Other variations of the encoder <NUM> can be used to encode the compressed bitstream <NUM>. For example, a non-transform based encoder <NUM> can quantize the residual signal directly without the transform stage <NUM> for certain blocks or frames. In another implementation, an encoder <NUM> can have the quantization stage <NUM> and the dequantization stage <NUM> combined into a single stage.

<FIG> is a block diagram of a decoder <NUM> according to implementations of this disclosure. The decoder <NUM> can be implemented in the receiving station <NUM>, for example, by providing a computer software program stored in the memory <NUM>. The computer software program can include machine instructions that, when executed by a processor such as the CPU <NUM>, cause the receiving station <NUM> to decode video data in the manner described herein. The decoder <NUM> can also be implemented in hardware included in, for example, the transmitting station <NUM> or the receiving station <NUM>. The decoder <NUM>, similar to the reconstruction path of the encoder <NUM> discussed above, includes in one example the following stages to perform various functions to produce an output video stream <NUM> from the compressed bitstream <NUM>: an entropy decoding stage <NUM>, a dequantization stage <NUM>, an inverse transform stage <NUM>, an intra/inter-prediction stage <NUM>, a reconstruction stage <NUM>, a loop filtering stage <NUM> and a deblocking filtering stage <NUM>. Other structural variations of the decoder <NUM> can be used to decode the compressed bitstream <NUM>.

When the compressed bitstream <NUM> is presented for decoding, the data elements within the compressed bitstream <NUM> can be decoded by the entropy decoding stage <NUM> to produce a set of quantized transform coefficients. The dequantization stage <NUM> dequantizes the quantized transform coefficients (e.g., by multiplying the quantized transform coefficients by the quantizer value), and the inverse transform stage <NUM> inverse transforms the dequantized transform coefficients using the selected transform type to produce a derivative residual that can be identical to that created by the inverse transform stage <NUM> in the encoder <NUM>. Using header information decoded from the compressed bitstream <NUM>, the decoder <NUM> can use the intralinter-prediction stage <NUM> to create the same prediction block as was created in the encoder <NUM>, e.g., at the intralinter prediction stage <NUM>. At the reconstruction stage <NUM>, the prediction block can be added to the derivative residual to create a reconstructed block. The loop filtering stage <NUM> can be applied to the reconstructed block to reduce blocking artifacts. Other filtering can be applied to the reconstructed block. In this example, the deblocking filtering stage <NUM> is applied to the reconstructed block to reduce blocking distortion, and the result is output as an output video stream <NUM>. The output video stream <NUM> can also be referred to as a decoded video stream, and the terms will be used interchangeably herein.

Other variations of the decoder <NUM> can be used to decode the compressed bitstream <NUM>. For example, the decoder <NUM> can produce the output video stream <NUM> without the deblocking filtering stage <NUM>. In some implementations of the decoder <NUM>, the deblocking filtering stage <NUM> is applied before the loop filtering stage <NUM>. Additionally, or alternatively, the encoder <NUM> includes a deblocking filtering stage in addition to the loop filtering stage <NUM>.

<FIG> is a flowchart diagram of a process <NUM> for coding a current block using an intra-prediction mode according to an implementation of this disclosure. In these examples, the intra-prediction mode has a corresponding prediction angle and uses pixels peripheral to the current block (e.g., a directional intra-prediction mode is used). The pixels peripheral to the current block can be previously predicted pixels in the same video frame as the current block.

The process <NUM> can be implemented, for example, as a software program that can be executed by computing devices such as the transmitting station <NUM> or the receiving station <NUM>. The software program can include machine-readable instructions that can be stored in a memory such as the memory <NUM> or the secondary storage <NUM>, and that can be executed by a processor, such as CPU <NUM>, to cause the computing device to perform the process <NUM>. The process <NUM> can be implemented in an encoder, a decoder, or both an encoder and a decoder. In at least some implementations, the process <NUM> can be performed in whole or in part by the intralinter prediction stage <NUM> of the encoder <NUM> of <FIG>. In other implementations, the process <NUM> can be performed in whole or in part by the intralinter-prediction stage <NUM> of the decoder <NUM> of <FIG>.

The process <NUM> can be implemented using specialized hardware or firmware. Some computing devices can have multiple memories, multiple processors, or both. The steps or operations of the process <NUM> can be distributed using different processors, memories, or both. Use of the terms "processor" or "memory" in the singular encompasses computing devices that have one processor or one memory as well as devices that have multiple processors or multiple memories that can be used in the performance of some or all of the recited steps.

At <NUM>, the process <NUM> determines, using an intra-prediction angle, a filter to apply to the reference pixels of the current block. A current block size can also be used as discussed in more detail herein. The reference pixels of the current block may be those indicated by the intra-prediction mode for use in generating a prediction block. The reference pixels may be at least some of the pixels peripheral to the current block as described with reference to <FIG>. The process <NUM> can determine the filter as described with respect to <FIG> and <FIG>.

<FIG> is a diagram of an intra prediction of a current block according to implementations of this disclosure. The diagram shows a portion of a frame <NUM> that includes the current block <NUM>. The current block <NUM> is shown as an 8x8 block. However, any block size is possible. For example, the current block can have a size (i.e., dimensions of) 4x4, 8x8, <NUM>×<NUM>, <NUM>×<NUM>, or any other square or rectangular block size. The current block <NUM> can be a block of a current frame. In another example, the current frame may be partitioned into segments (such as the segments <NUM> of <FIG>), tiles, or the like, each including a collection of blocks, where the current block is a block of the partition. For example, a current frame may be partitioned into four tiles (e.g., a top-left tile, a top-right tile, a bottom-left tile, and a bottom-right tile). Each tile includes blocks, at least some of which can be processed in accordance with this disclosure. The blocks of a tile can be of different sizes. For example, an 8x8 block can have an adjacent 16x16 left block. A tile, as used herein, refers to a frame or a partition of a frame. The blocks of a tile can be processed based on a scan order of the tile. The tiles can be processed based on a scan order of the frame.

In this example, the current block <NUM> is intra predicted using an intra-prediction mode having a prediction angle as illustrated by the directional lines <NUM>. As indicated above, the prediction angle can be any angle between <NUM> and <NUM> degrees. The prediction mode uses pixels peripheral to the current block <NUM>. Peripheral pixels are pixels that are outside of the current block <NUM> and within the current frame. The peripheral pixels can include one or more rows and columns adjacent to the current block <NUM>. The peripheral pixels in <FIG> include first pixels <NUM> in a row and second pixels <NUM> in a column. The first pixels <NUM> include the eight horizontal pixels between pixels <NUM> and <NUM> (e.g., corresponding to the horizontal dimension of the 8x8 current block <NUM>). The second pixels <NUM> include the eight vertical pixels between pixels <NUM> and <NUM> (e.g., corresponding to the vertical dimension of the 8x8 current block <NUM>). The peripheral pixels can include a corner pixel <NUM>, also referred to as a top-left pixel, which is at the intersection of the first pixels <NUM> and the second pixels <NUM>.

The first pixels <NUM> are depicted above (i.e., on top of) the current block and the second pixels <NUM> are depicted to the left of the current block <NUM>. However, this need not be the case. The horizontal pixels and the vertical peripheral pixels can be selected based on a scan order of the current tile. For example, in a raster scan order, the blocks of a tile may be processed, row-wise, from the top left block to the bottom right block. In a case where, for example, the scan order is from bottom right to top left, the first pixels (e.g., the horizontal peripheral pixels) may be below the current block and the second pixels (e.g., the vertical peripheral pixels) may be to the right of the current block. Zig-zag or other scan orders are also possible. In <FIG>, the first pixels <NUM> are depicted as comprising one row of horizontal pixels and the second pixels <NUM> are depicted as comprising one column of vertical pixels. This need not be the case. The first pixels <NUM> can include one or more rows of pixels. The second pixels <NUM> can include one or more columns of pixels. The corner pixel <NUM> is a single top-left pixel, but could comprise more than one pixel and/or be located in a different position relative to the current block <NUM> in these alternative implementations.

Depending on the intra-prediction mode (i.e., the prediction angle), additional peripheral pixels may be used to perform the intra prediction. The number of additional pixels in the horizontal and/or vertical directions can be, but not need be, the same as the horizontal and/or vertical dimension of the current block <NUM>, respectively.

The additional pixels can be previously decoded or predicted pixels, if available. For example, the second pixels <NUM> are depicted as including additional pixels <NUM>. The additional pixels <NUM> can be the pixels of an adjacent and previously predicted or decoded block within the same tile as the current block <NUM>.

The additional pixels can be extended pixels. Extended pixels can be used when neighboring pixels (i.e., pixels from an adjacent and previously predicted or decoded block) are not available for use. For example, neighboring pixels may not be available for use when a current block abuts (i.e., is adjacent to) a boundary (i.e., a vertical edge and/or a horizontal edge) of the current tile. As another example, neighboring pixels may not be available when a neighboring block that includes the needed pixels is not decoded or predicted before the current block.

Extended pixels can be derived from other adjacent peripheral pixels. Here, the first pixels <NUM> are depicted as including extended pixels <NUM> (indicated as shaded pixels). In an example, the extended pixels <NUM> can be derived by extending the value of the last (e.g., in the direction of the scan order) peripheral pixel value coincident with the horizontal dimension of the current block <NUM>. For example, the value of each of the extended pixels <NUM> can be set to the value of the last pixel <NUM>. In a left-to-right and top-to-bottom scan order, the last pixel <NUM> is the last non-extended pixel of the first pixels <NUM> because it is the right-most pixel in the left-to-right scan order, and the last pixel <NUM> is the last non-extended pixel of the second pixels <NUM> because it is the bottom-most pixel in the top-to-bottom scan order. While <FIG> depicts only extended horizontal pixels (i.e., extended pixels <NUM>), extended vertical pixels are also possible. For example, if the additional pixels <NUM> were not available, then the second pixels <NUM> may include extended vertical pixels, if necessitated by the intra-prediction mode, that all use the value of the pixel <NUM> that is coincident with the vertical dimension of the current block <NUM>.

In some arrangements and locations of a block, there are no pixels available for prediction along an edge. For example, a block may have no pixels adjacent to the top of the block, or may have no pixels to the left of the block. As can be determined from <FIG>, Zone <NUM> intra-prediction modes use only top reference pixels, Zone <NUM> intra-prediction modes use only left reference pixels, and Zone <NUM> intra-prediction modes use both the top and left reference pixels. Limiting intra-prediction modes to only those modes that rely on only available pixels is possible, but may result in reduced compression efficiency. Instead, where an above/top or left edge is unavailable, a pixel value may be copied from the other edge. The pixel value may be from the pixel closest (e.g., spatially nearest) to the unavailable edge. Using <FIG> by example, the pixel value of the pixel <NUM> may be used for horizontal pixels corresponding to the first pixels <NUM> and the extended pixels <NUM> and optionally for the top-corner pixel <NUM> when the row above the current block <NUM> is not available. Similarly, the pixel value of the pixel <NUM> may be used for vertical pixels corresponding to the second pixels <NUM> and the additional pixels <NUM> and optionally for the top-corner pixel <NUM> when the column to the left of the current block <NUM> is not available. This innovation avoids prediction discontinuities at tile boundaries, among other benefits.

The process <NUM> determines a filter to apply to the pixels peripheral to the current block <NUM> based on the prediction angle. In an example, a difference between a line perpendicular to the top edge (i.e., the horizontal edge) of the current block and the prediction angle is used to determine the filter. Stated differently, the filter may be determined based on a vertical line that is parallel to the left edge of the current block <NUM> and the prediction angle. Determining a filter can include determining a first filter for (i.e., to be applied to) the first pixels <NUM> and a second filter for the second pixels <NUM>.

For example, the first filter to be applied to the first pixels <NUM> (i.e., the peripheral pixels above the current block), can be determined based on an angle delta <NUM>. The angle delta <NUM> is the angle between a line <NUM> that is a vertical line parallel to the left edge of the current block <NUM> and the prediction angle indicated by the directional lines <NUM>. The second filter can be determined based on an angle delta <NUM>. The angle delta <NUM> is the angle between a horizontal line <NUM> that is parallel to the top edge of the current block <NUM> and the prediction angle indicated by the directional lines <NUM>.

In an example, the angle delta <NUM> and the angle delta <NUM> can be calculated based on the prediction angle using the following formulas: <MAT> <MAT>.

That is, for the first pixels <NUM> (e.g., peripheral pixels that are along a horizontal line), the angle delta <NUM> can be the absolute value of the difference between the prediction angle and <NUM> degrees; for the second pixels <NUM> (e.g., peripheral pixels that are along a vertical line), the angle delta <NUM> can be the absolute value of the difference between the prediction angle and <NUM> degrees.

In addition to the angle delta, the process <NUM> can determine the filter based on the size of the current block. The filter determined by the process <NUM> can be a low-pass n-tap filter. The variable n may be an odd integer. For example, a <NUM>-tap filter is described below with respect to <FIG>. However, other types of filters and filter sizes can be selected.

In some cases, the process <NUM> can determine a filter strength based on the angle delta and the block size. For example, Table <NUM> illustrates filter strengths based on an angle delta and the current block size, specifically, the dimension (i.e., the number or cardinality of whole pixels) of a block edge. The ranges of values for angle delta, the block edge dimensions, and the corresponding filter strengths can vary from the example shown in Table <NUM>.

Filters with increasing strengths (e.g., the modified pixel value receives a higher percentage of contribution from adjacent pixel values than the current pixel value) can be selected as the angle delta increases. For example, for a 16x16 block, when the angle delta is between <NUM> and <NUM>, a filter of strength <NUM> can be selected, whereas a filter of strength <NUM> is selected when the angle delta is between <NUM> and <NUM>. A filter strength of zero can indicate that no filter is to be selected (i.e., no filtering is to be performed). For an 8x8 block, filtering can start for angle deltas greater than <NUM>. For a 16x16 block, filtering can start for angle deltas greater than <NUM>. For 32x32 blocks, filtering can start for angle deltas greater than <NUM>. A filter strength of zero can mean that the process <NUM> is to bypass filtering of the peripheral pixels (i.e., apply no filtering to the peripheral pixels).

As an illustration of using Table <NUM>, assume that the current block is a 32x32 block and that the prediction mode is a vertical prediction mode (as described with respect to <FIG>). As such, the angle delta <NUM> is zero (i.e., ABS (<NUM> - <NUM>)). A delta value of zero, according to the first row of Table <NUM>, results in a filter of zero strength. A filter of zero strength can correspond to no filtering. Therefore, when the prediction angle is <NUM> degrees, no filtering is performed on the first pixels (e.g., peripheral pixels that are above the current block). The angle delta <NUM> is <NUM> (i.e., absolute (<NUM> - <NUM>)). Even though Table <NUM> indicates a filter of strength <NUM> for an angle delta between (<NUM>, <NUM>), the process <NUM> may not filter the second pixels (e.g., peripheral pixels that are to the left of the current block) because, as described with respect to <FIG>, the left pixels (i.e., J-R of <FIG>) are not required for the vertical intra-prediction mode.

As another example, assume that the current block is a 16x16 block and that the prediction mode has a prediction angle of <NUM> degrees as illustrated in <FIG>. As such, the value of the angle delta <NUM> (the angle delta for the first pixels above the current block) is <NUM> (i.e., ABS (<NUM>-<NUM>)) which results in a filter of strength <NUM>. Correspondingly, the angle delta <NUM> (the angle delta for the second pixels to the left of the current block) is also <NUM> (i.e., ABS (<NUM>-<NUM>)) which also results in the filter of strength <NUM>.

As yet another example, the process <NUM> can determine a filter when the angle delta is compared to a threshold. For example, a filter is not determined when the angle delta is greater than a threshold of <NUM> degrees. When a filter is not determined, filtering the peripheral pixels is bypassed. For example, assume the current block is an 8x8 block and that the prediction mode has a prediction angle of <NUM> degrees. As such, the value of the angle delta <NUM> (the angle delta for the first pixels above the current block) is <NUM> (i.e., ABS (<NUM>-<NUM>)). Table <NUM> indicates that where the angle delta is greater than <NUM>, there is no entry for filtering. This result can indicate that the peripheral pixels corresponding to the calculated angle delta may not be used to generate the prediction block, as described above with respect to <FIG>. As such, filtering these pixels is unnecessary. Alternatively, even if the peripheral pixels are used to generate the prediction block, filtering may be bypassed when the angle delta is greater than the threshold (e.g., <NUM> degrees). In this example, the angle delta <NUM> (the angle delta for the second pixels to the left of the current block) is <NUM> (i.e., ABS (<NUM>-<NUM>)), which results in a filter of strength <NUM>.

In some examples, no filter is selected for 4x4 blocks. In contrast, in the example of Table <NUM>, a minimum prediction block size for certain angle deltas are processed by upsampling pixels along a prediction edge, as indicated by the entry "Up. " In this example, the minimum prediction block size is 4x4 pixels. Use of upsampling for certain edges as described herein can improve the gain for the image data over that achievable using the other filtering described herein depending on the transform kernel used. An example of an upsampling filter is described below.

Determining a filter at <NUM> as described above includes determining a filter strength or type. By selecting a filter strength, a filter can be correspondingly determined. That is, each of the filter strengths or types can be associated with a respective filter. Each of the filter strengths or types above, together with a respective filter, can form a filter kernel. Examples of filters include a <NUM>-tap filter with weights (<NUM>, <NUM>, <NUM>) and a <NUM>-tap filter with weights (<NUM>, <NUM>, <NUM>). Other filters are possible. One possible set of filter kernels is included in Table <NUM> below.

According to this example, a filter strength of <NUM> corresponds to the (<NUM>, <NUM>, <NUM>) filter. A filter strength of <NUM> corresponds to the filter (<NUM>, <NUM>, <NUM>). A filter strength of <NUM> corresponds to the filter (<NUM>, <NUM>, <NUM>, <NUM>, <NUM>). A filter strength of zero indicates that no filtering is performed (i.e., filtering is bypassed). Alternatively, a filter strength of zero can correspond to a filter having weights (<NUM>, <NUM>, <NUM>). The upsampling filter is discussed in more detail below. Other filters are possible.

In another example, the filter strength can be further based on a quantization parameter that regulates the encoding bit rate and can be based on an activity measure (e.g., a variance value). A quantization parameter can be available for the current block (i.e., a block-level quantization parameter), for the current frame (i.e., a frame-level quantization parameter) that contains the current block, or both. A block-level quantization parameter can be encoded by an encoder in the block header and decoded by a decoder from the block header. A frame-level quantization parameter can be encoded by an encoder in the frame header and decoded by a decoder from the frame header. Where a block-level quantization parameter is not available, the frame-level quantization parameter can be used as the block-level quantization parameter. A relatively low quantization parameter can be indicative of more detail in the current frame (or current block, as the case may be) and a relatively high quantization parameter can be indicative of lower details in the current frame (or block). As such, the quantization parameter can be used to modulate the filter strength. For example, the strength of the filter can be proportional to the value of the quantization parameter. That is, weaker filtering can be applied for lower values of the quantization parameter and stronger filtering can be applied for higher values of the quantization parameter. In one application of this example, the filtering strength (and accordingly the filter) determined by the angle delta(s) and/or the block size can be reduced by a value of one for values of the quantization parameter below a lower limit, and increased by a value of one for values of the quantization parameter above an upper limit. Variations of incorporating the quantization parameter into the filter selection, or into the application of the filter(s) to obtain modified values are possible.

The examples above describe different filters to filter the reference pixels along two edges of the block (e.g., the above and left edges). The same filter choices may be available to each edge, or each edge may have one or more filter choices different from those available to the other edge. The same or a different filter strength may be used for each edge. For example, a different angle delta does not have to be considered for selecting the filter for each edge. Instead, the angle delta of the dominant prediction edge (as indicated by the intra-prediction mode) may be used to select a single filter for both edges. That is, the larger angle delta is used. Using the angle delta of the dominant prediction edge may apply a stronger filter to the reference pixels of the other prediction edge than would occur if the other angle delta was used to determine the filter for that prediction edge. Other variations are possible. For example, instead of using the angle delta, absolute values of the intra-prediction angles may be compared to ranges of values to determine the filter.

While the process <NUM> can use Table <NUM> for filter selection for blocks having differing dimensions, the process <NUM> uses Table <NUM> for filter selection for square blocks only in some implementations. This is because Table <NUM> may be less effective for non-square blocks than for square blocks. An alternative implementation may use a combination of the dimensions of the block as an input to a table, instead of a block edge dimension. The combination of the dimensions of the block may be a sum of the height and width of the block, also called the prediction height and the prediction width herein. For example, the prediction height and prediction width may be specified in pixels.

Similarly to Table <NUM>, the values of the angle delta, the prediction block dimensions, and the corresponding filter strengths in Tables <NUM> and <NUM> can vary from those shown. Although groupings of data reflecting the combinations of intra-prediction mode (as represented by angle delta) and prediction block size (as represented by the block edge dimension or the sum of the block width and height) as inputs and their associated filter strengths (or filters) as output are included in tables herein, any other arrangement or grouping that pairs the inputs and outputs is possible.

In some implementations, determining the filter at <NUM> can include determining the filter based on the prediction mode of at least one neighboring block to the current block. Determining the filter based on the prediction mode of at least one neighboring block may include determining the intra-prediction mode of one or more blocks to the left of the current block, one or more blocks above the current block, or one or more blocks to the left of and one or more blocks above the current block. Determining the filter based on the prediction mode of at least one neighboring block may further include using a first technique to determine the filter when a defined number of neighboring blocks uses a first prediction mode, and otherwise using a second technique to determine the filter. The first technique can include selecting a first filter from a first group of pairings of intra-prediction modes and prediction block size with a respective filter. The first group of pairings may be Table <NUM>, for example. The second technique can include selecting a second filter from a second group of pairings of intra-prediction modes and prediction block size with a respective filter. The second group of pairings may be Table <NUM>, for example.

The defined number of neighboring blocks can be one or more blocks. The prediction modes of the neighboring blocks considered may be intra-prediction modes. When the prediction mode of a neighboring block indicates that the current block is likely to benefit from greater filtering of the reference pixels, then a group of pairings using relatively strong filters may be selected. Otherwise, a group of pairings using relatively weaker filters may be selected. In an example, when one or more neighboring blocks is encoded using a prediction mode indicating that the block has a smooth gradient, the current block is likely to benefit from greater filtering. In the AV1 codec, such prediction modes include SMOOTH_PRED, SMOOTH_H_PRED, and SMOOTH_V_PRED intra modes. In this example, if either a block to the left of or a block above the current block, or both, use an intra-prediction mode from the group consisting of SMOOTH_PRED, SMOOTH_H_PRED, and SMOOTH_V_PRED, then the filter is determined using Table <NUM>. Otherwise, the filter is determined using Table <NUM>.

At <NUM>, the process <NUM> filters, using the filter, the reference pixels. The filtering results in modified reference pixels, also referred to as modified pixels or modified edge pixels herein. Filtering is further described by reference to <FIG>.

<FIG> is a diagram <NUM> of an example of filtering peripheral or reference pixels according to implementations of this disclosure. The diagram <NUM> identifies peripheral pixels <NUM>. The peripheral pixels <NUM> are filtered based on the filter and/or a filter strength determined by the process <NUM> at <NUM>. The filtering results in modified pixels <NUM>. The peripheral pixels <NUM> can be the first pixels <NUM> and/or the second pixels <NUM> of <FIG>.

In the case of a filter strength of zero, the process <NUM> bypasses filtering at <NUM>. That is, the process <NUM> does not perform filtering of the peripheral pixels. As such, the modified pixels <NUM> are the same as the peripheral pixels <NUM>. When the filter strength is <NUM>, the modified pixels <NUM> can result from applying, at <NUM>, the <NUM>-tap filter with weights (<NUM>, <NUM>, <NUM>) to the peripheral pixels. When the filter strength is <NUM>, the <NUM>-tap filter with weights (<NUM>, <NUM>, <NUM>) is applied to the peripheral pixels, at <NUM>, to generate the modified pixels <NUM>. When the filter strength is <NUM>, the process <NUM> applies, at <NUM>, the <NUM>-tap filter with weights (<NUM>, <NUM>, <NUM>, <NUM>, <NUM>) to the peripheral pixels to generate the modified pixels <NUM>. Alternatively, the <NUM>-tap filter with weights (<NUM>, <NUM>, <NUM>) can be selected when the filter strength is <NUM>.

In an implementation, a filter can be applied more than once based on the filter strength. For example, if the (<NUM>, <NUM>, <NUM>) filter is selected when the filter strength is equal to <NUM>, that filter can be applied twice to obtain the modified pixels <NUM>. That is, the filter is first applied to the peripheral pixels <NUM>, resulting in intermediate pixels, and is then applied to the intermediate pixels to obtain the modified pixels <NUM>.

An example of filtering, also called applying a filter herein, is now provided. In general, all edge predictors (also referred to herein as reference pixels) may be filtered. As described below, the upper-left pixel (such as pixel <NUM> in <FIG>), extended samples (such as the extended pixels <NUM> in <FIG>), and the last available above/top pixel (such as the pixel <NUM> in <FIG>) and left pixel (such as the pixel <NUM> in <FIG>) may not be filtered.

At <NUM>, applying the (<NUM>, <NUM>, <NUM>) filter to the pixel <NUM> of <FIG> when the filter strength of <NUM> is performed as follows: <MAT>.

Filtering a pixel can use other adjacent pixels such that the pixel to be filtered is centered in the adjacent pixels. That is, for a filter of size n (i.e., an n-tap filter), the process <NUM> can use (n-<NUM>)/<NUM> pixels on each side of the pixel to be predicted. For example, for a <NUM>-tap filter, <NUM> (i.e., (<NUM>-<NUM>)/<NUM>) pixel can be used on each side of the pixel to be filtered. In the present example, the pixel <NUM> is centered between the pixel <NUM> and the pixel <NUM>. When an insufficient number of adjacent pixels is available to filter a pixel, the process <NUM> can exclude filtering the pixel. For example, while pixel <NUM> has an above neighboring pixel <NUM>, it does not have a below neighboring pixel. As such, the process <NUM> can exclude filtering of the pixel <NUM>. In such a case, filtering the pixel <NUM> is bypassed as described with respect to <NUM>. That is, the process <NUM> excludes from the filtering (i.e., bypasses) a peripheral pixel of the peripheral pixels when the peripheral pixels are a row above or below (or a column to the left or the right of) the current block and the peripheral pixel does not have at least (n-<NUM>)/<NUM> adjacent left peripheral pixels or right peripheral pixels (or adjacent peripheral pixels above or below the peripheral pixel). In some implementations, if insufficient pixels are available, the first or last available pixel can be extended. For example, if pixel <NUM> is filtered with a <NUM>-tap filter, the value of pixel <NUM> may be extended (also referred to as replicated) by one position to the left to create the required additional value.

Filtering of the pixel <NUM> can be bypassed. The pixel <NUM> has a left neighboring pixel <NUM>. However, as the right neighboring pixel <NUM> is an extended pixel (meaning its value is the same as the pixel <NUM>), the process <NUM> can bypass filtering of the pixel <NUM>. Alternatively, the process <NUM> can filter the pixel <NUM> using the left neighboring pixel <NUM> and the right neighboring pixel <NUM> as described previously.

In an example, filtering a corner pixel, such as the corner pixel <NUM>, can be bypassed. This pixel is not used in any of the Zone <NUM> or Zone <NUM> intra-prediction modes, so whether or not to bypass filtering a corner pixel may be based on the intra-prediction mode for the current block. For example, the corner pixel may be filtered when the intra-prediction mode is in Zone <NUM>. The corner pixel can be filtered using adjacent first pixels and adjacent left pixels. For example, the corner pixel <NUM> can be filtered using pixel <NUM> (e.g., its adjacent horizontal pixel) and pixel <NUM> (e.g., its adjacent vertical pixel). Where the first pixels (such as the first pixels <NUM>) form a horizontal row above the current block and the second pixels (such as the second pixels <NUM>) form a vertical column to the left of the current block, the corner pixel <NUM> can be referred to as the upper-left pixel or top-left pixel as mentioned briefly above. It is possible that the corner pixel is filtered after the above and/or left edge reference pixels are filtered. It is more desirable if the corner pixel is filtered before any other pixels.

Although not shown in <FIG>, in the case of a filter strength designated "Up", peripheral pixels <NUM> may be upsampled using an upsampling/upsample filter to produce the modified pixels <NUM>. The upsampling filter may be a 2x upsample filter for a block edge having a length of four pixels. The filter can be used to interpolate <NUM> half-sample positions per edge. A <NUM>-tap filter (-<NUM>, <NUM>, <NUM>, -<NUM>) may be used. Pseudo-code that can implement the upsampling for an edge follows, where edge[<NUM>] comprises the reference pixels along a first edge or along a second edge, upsample [i] comprises the upsampled value for the current pixel i, and upsample[<NUM>] comprises the modified pixels, such as the modified pixels <NUM>.

The function round() may be more generally defined as round(x) - (x + csum/<NUM>) / csum, where csum is the sum of the filter coefficients. When the upsampling filter is used, a clipping function may be applies to constrain the output value to the pixel range (e.g., <NUM>, <NUM>, or <NUM> bits). The clipping function may be applied as part of the round() function. In the example of the upsampling filter described herein, the coefficient of -<NUM> makes it possible for the filtered values to exceed the range.

At <NUM>, the process <NUM> generates a prediction block for the current block using the intra-prediction mode and the modified reference pixels (such as the modified pixels <NUM> of <FIG>).

As discussed above, multiple intra-prediction modes are available. The intra-prediction mode for the current block is preferably selected before the process <NUM> through a rate-distortion calculation that compares the bit cost (rate) of encoding the current block with some or all available intra- and inter-prediction modes with the errors (distortion in the reconstructed block as compared to the current block) resulting from encoding the current block using the respective prediction mode. The prediction mode selected for generating the prediction block is generally the prediction mode with the lowest rate-distortion value.

The multiple intra-prediction modes that are available include both directional/angular intra-prediction modes and intra-prediction modes that do not predict pixels according to an angle or direction. The process <NUM> describes steps that occur when the prediction mode determined is a directional/angular intra-prediction mode. In some implementations, only <NUM> directional/angular intra-prediction modes are available, including for example, those with prediction angles of <NUM>, <NUM>, <NUM>, <NUM>, <NUM>, <NUM>, <NUM>, and <NUM> degrees. each of these base prediction angles may be associated with a respective base directional mode. In other implementations, additional directional/angular intra-prediction modes are available. For example, additional prediction angles may be supported by adding a delta parameter for each base directional mode. Additional prediction angles may be defined by: <MAT>.

In this formulation, nominal_angle corresponds to the angle of a base directional mode, angle_delta is an integer within a defined range, and angle_step is an integer value. The variable angle_delta is different from the angle delta calculated as described above, and in an example angle_delta is in a predefined range of [-<NUM>, <NUM>]. The variable angle_step may also be predefined. In an example where the variable nominal_angle is <NUM> degrees, the variable angle_delta is -<NUM>, and the variable angle_step is <NUM>, the actual prediction angle for the intra-prediction mode is <NUM> + (-<NUM> * <NUM>) = <NUM> degrees. The use of additional directional modes may be disabled for certain block sizes. For example, blocks smaller than 8x8 pixels may not be allowed to use additional directional modes over any base directional modes. The variables angle_delta and angle_step may be defined such that more angles and hence more directional modes are available for larger blocks. For example, the predefined range of [-<NUM>, <NUM>] for angle_delta and the value <NUM> for angle_step provides fifty-six angles. These values may be limited to a block size greater than or equal to 16x16 pixels. Fewer angles may be available to block sizes below 16x16 pixels in this example. One combination that results in fewer angles occurs when the variable angle_delta has a range of [-<NUM>, <NUM>] and angle_step has a value of <NUM>. This combination results in forty angles.

One example of pseudo-code that can be used to generate a prediction block is as follows. In this example, a 4x4 prediction block is generated (pred[<NUM>]) using the modified pixels <NUM> previously described.

When performed by an encoder, the process <NUM> can encode, in an encoded bitstream (such as the compressed bitstream <NUM> of <FIG>), an indicator (e.g., one or more syntax elements) to apply the filter to reference pixels of the current block. The indicator may be encoded into a block, a frame, a slice, and/or a tile header. For example, the indicator may be encoded into the header of the residual block resulting from prediction of the current block. When performed by a decoder, the process <NUM> can decode from the encoded bitstream (e.g., the compressed bitstream <NUM> of <FIG>), the indicator to apply the filter to reference pixels of the current block. For example, the indicator can identify one or more filters, filter strengths, filter weights, or a combination thereof. The indicator can signal that the decoder is to apply intra-prediction edge filtering. In such cases, the decoder can perform the process <NUM> to generate a prediction block for decoding the current residual decoded from the encoded bitstream that represents the current block. For example, the indicator can be a tile-level or a block-level parameter indicating to the decoder to modulate the filter strength. The decoder can use the quantization parameter to perform the modulation.

In addition to the indicator, the encoder may also encode into the bitstream the prediction mode used to predict the current block (e.g., at the intralinter prediction stage <NUM>) for use by the decoder to generate the prediction block (e.g., at the intralinter-prediction stage <NUM>) for decoding the current block. For example, the encoder can encode a second indicator of the base directional mode. Where additional directional modes are available to, and are used for prediction of, the current block, the encoder may also code the value for angle_delta within the defined range of values for angle_delta. The value may be coded into a header for the block (i.e., the header for the residual block), a slice in which the block is located, and/or the frame in which the block is located. Entropy coding angle_delta may be performed using a uniform and non-adapting probability model, also referred to as an adaptive probability model herein. In some implementations, this model may be replaced by a context model. The context model may, for example, vary dependent on the context of the intra-prediction mode (e.g., whether the current block is predicted using a directional prediction mode that is dominated by a vertical or horizontal angle, that is, whether the angle of the directional prediction mode is closer to <NUM> degrees or <NUM> degrees, respectively), and the relative use by other blocks of the intra-prediction modes. According to one implementation, the following code represents the context model (i.e., a non-uniform, adapting cumulative distribution function (cdf)) for entropy coding angle_delta:
<IMG>
where DIRECTIONAL_MODES is the number of base directional modes, here a constant of <NUM>, and MAX_ANGLE_DELTA based on the available angle_delta values and is equal to <NUM> in this example.

In an example, the size of the context model is fifty-six words (which is equal to <NUM> base directional modes times <NUM> angle_delta values). The context adapts using previously-coded blocks. The context can be reset to a default cdf at the start of each key frame. The default cdf may be represented by a table of probabilities. One example of the default cdf is:
<IMG>.

The function AOM_ICDF() inverts the cdf so that it starts at <NUM> and descends to <NUM> instead of starting at <NUM> and increasing up to <NUM>.

The aspects of encoding and decoding described above illustrate some encoding and decoding techniques. However, it is to be understood that encoding and decoding, as those terms are used in the claims, could mean compression, decompression, transformation, or any other processing or change of data.

The words "example" or "implementation" are used herein to mean serving as an example, instance, or illustration. Any aspect or design described herein as "example" or "implementation" is not necessarily to be construed as preferred or advantageous over other aspects or designs. Rather, use of the words "example" or "implementation" is intended to present concepts in a concrete fashion. As used in this application, the term "or" is intended to mean an inclusive "or" rather than an exclusive "or". That is, unless specified otherwise, or clear from context, "X includes A or B" is intended to mean any of the natural inclusive permutations. That is, if X includes A; X includes B; or X includes both A and B, then "X includes A or B" is satisfied under any of the foregoing instances. In addition, the articles "a" and "an" as used in this application and the appended claims should generally be construed to mean "one or more" unless specified otherwise or clear from context to be directed to a singular form. Moreover, use of the term "an implementation" or "one implementation" throughout is not intended to mean the same embodiment or implementation unless described as such.

Implementations of transmitting station <NUM> and/or receiving station <NUM> (and the algorithms, methods, instructions, etc., stored thereon and/or executed thereby, including by encoder <NUM> and decoder <NUM>) can be realized in hardware, software, or any combination thereof. The hardware can include, for example, computers, intellectual property (IP) cores, application-specific integrated circuits (ASICs), programmable logic arrays, optical processors, programmable logic controllers, microcode, microcontrollers, servers, microprocessors, digital signal processors or any other suitable circuit. In the claims, the term "processor" should be understood as encompassing any of the foregoing hardware, either singly or in combination. The terms "signal" and "data" are used interchangeably. Further, portions of transmitting station <NUM> and receiving station <NUM> do not necessarily have to be implemented in the same manner.

Further, in one aspect, for example, transmitting station <NUM> or receiving station <NUM> can be implemented using a computer or processor with a computer program that, when executed, carries out any of the respective methods, algorithms and/or instructions described herein. In addition, or alternatively, for example, a special purpose computer/processor can be utilized which can contain other hardware for carrying out any of the methods, algorithms, or instructions described herein.

Transmitting station <NUM> and receiving station <NUM> can, for example, be implemented on computers in a video conferencing system. Alternatively, transmitting station <NUM> can be implemented on a server and receiving station <NUM> can be implemented on a device separate from the server, such as a hand-held communications device. In this instance, transmitting station <NUM> can encode content using an encoder <NUM> into an encoded video signal and transmit the encoded video signal to the communications device. In turn, the communications device can then decode the encoded video signal using a decoder <NUM>. Alternatively, the communications device can decode content stored locally on the communications device, for example, content that was not transmitted by transmitting station <NUM>. Other transmitting station <NUM> and receiving station <NUM> implementation schemes are available. For example, receiving station <NUM> can be a generally stationary personal computer rather than a portable communications device and/or a device including an encoder <NUM> may also include a decoder <NUM>.

Claim 1:
A method for coding a current block (<NUM>,<NUM>) of a current tile using an intra-prediction mode, the intra-prediction mode comprising a prediction angle (<NUM>), the method comprising:
determining, using the prediction angle, a filter to apply to reference pixels peripheral to the current block wherein the reference pixels comprise at least one of first pixels in a row above the current block (<NUM>,<NUM>), and second pixels in a column left of the current block (<NUM>,<NUM>),and wherein determining the filter comprises comparing an angle delta and a size of the current block (<NUM>,<NUM>) to indices of a table, wherein each entry of the table comprises an identifier of a filter kernel; and
wherein said determining comprises determining a first filter using a first angle delta (<NUM>) between the prediction angle and a first line parallel to a first edge of the current block, and
the first filter is determined from a filter kernel of a first identifier responsive to the first angle delta and the size corresponding to indices paired with the first identifier, wherein the first identifier comprises at least one of an identifier of one of a plurality of low-pass filters with different weights, an identifier to bypass filtering, or an identifier of an upsampling filter; and
determining a second filter using a second angle delta (<NUM>) between the prediction angle and a second line parallel to a second edge of the current block that is orthogonal to the first edge, and
the second filter is determined from a filter kernel of a second identifier responsive to the second angle delta and the size corresponding to indices paired with the second identifier, wherein the second identifier comprises at least one of an identifier of one of the plurality of low-pass filters with different weights, the identifier to bypass filtering, or the identifier of the upsampling filter;
filtering, using the first filter, the first pixels to generate first modified reference pixels;
filtering, using the second filter, the second pixels to generate second modified reference pixels; and
generating a prediction block (<NUM>) for the current block using the intra-prediction mode and the first and second modified reference pixels.