Patent Description:
Digital video streams may represent video using a sequence of frames or still images. Digital video can be used for various applications including, for example, video conferencing, high definition video entertainment, video advertisements, or sharing of user- generated videos. A digital video stream can contain a large amount of data and consume a significant amount of computing or communication resources of a computing device for processing, transmission, or storage of the video data. Various approaches have been proposed to reduce the amount of data in video streams, including compression and other encoding techniques.

Encoding based on motion estimation and compensation may be performed by breaking frames or images into blocks that are predicted based on one or more predictor blocks of reference frames. Differences (i.e., residual errors) between blocks and predictor blocks are compressed and encoded in a bitstream. A decoder uses the differences and the reference frames to reconstruct the frames or images. <CIT> describes video encoding method and apparatus that obtain weights for intra-prediction and inter-prediction. <CIT>describes encoding and decoding of pixels blocks of a video frame through a hybrid mode involving a first prediction of a pixel block and at least a second prediction of a pixel block. <CIT> <NUM> describes a method and apparatus for video encoding and decoding including generating a prediction block using an inter-intra hybrid predictor. <CIT> describes video coding using combined inter and intra predictors.

The disclosure relates in general to video coding, and in particular to compound prediction modes for video coding.

One aspect of the disclosed implementations is a method for generating a compound predictor block of a current block of video according to one implementation. The method includes generating, for the current block, predictor blocks including a first predictor block of first predictor pixels. The method also includes determining, for a first predictor pixel of the first predictor pixels and using at least a subset of the first predictor pixels, a first modulation value for modulating a first weight to be applied to the first predictor pixel, and generating the compound predictor block using the first predictor pixel, the first weight, and the first modulation value.

Therefore, when decoding a block encoded in this way, distortion between the original block and the reconstructed block can be reduced.

Optionally, the first weight is selected from a weighting scheme comprising weights <NUM>, <NUM>, <NUM>, and <NUM>, and the method further comprises encoding the first weight in an encoded bitstream.

The predictor blocks further comprise a second predictor block of second predictor pixels. Generating the compound predictor block using the first predictor pixel and the first modulation value comprises using, for a second predictor pixel of the second predictor pixels, a second modulation value for modulating a complement of the first weight, wherein the second modulation value is determined using at least a subset of the second predictor pixels.

Optionally, the first modulation value is determined based on a difference between the first predictor pixel and the second predictor pixel.

The first modulation value is determined using a smoothness in a window around the first prediction pixel.

Optionally, the window is centered at the first prediction pixel and is of size 3x3.

Optionally, the first modulation value is determined using a decaying function having a maximum value at a predetermined pixel value of the first predictor block, and the first prediction pixel is input to the decaying function to determine the first modulation value.

Optionally, the method may further comprise decoding the first weight from an encoded bitstream.

Another aspect is an apparatus for generating a compound predictor block including a memory and a processor according to one implementation of this disclosure. The processor is configured to execute instructions stored in the memory to generate a first predictor block and a second predictor block, the first predictor block comprising first predictor pixels and the second predictor block comprising second predictor pixels, determine respective first modulation values for respective first predictor pixels of the first predictor block, determine respective second modulation values for respective second pixels of the second predictor block, and determine pixel values for pixels of the compound predictor block using the first predictor pixels, the first modulation values, the second predictor pixels, and the second modulation values. Each first modulation value is determined using at least some of the first predictor pixels. Each second modulation value is determined using at least some of the second predictor pixels.

Optionally, the instructions further comprise instructions to decode, from an encoded bitstream, a baseline weight, wherein the baseline weight indicates a mask comprising a first baseline weight and a complement of the first baseline weight.

Optionally, each first modulation value is used to modulate the first baseline weight and each second modulation value is used to modulate the complement of the first baseline weight.

Optionally, the baseline weight indicates a weight from a weighting scheme comprising <NUM>, <NUM>, <NUM>, and <NUM>.

Optionally, the instructions further comprise instructions to decode a complementary mask indicator and, based on the complementary mask indicator, modulate the complement of the first baseline weight using each first modulation value and modulate the first baseline weight using each second modulation value.

Optionally, the first modulation value for a first predictor pixel and the second modulation value for a second predictor pixel are based on a characteristic of the first predictor pixel and the second predictor pixel, wherein the first predictor pixel and the second predictor pixel are co-located.

Optionally, the characteristic comprises a difference between the first predictor pixel and the second predictor pixel.

Optionally, the instructions further comprise instructions to select a first baseline weight and a complement of the first baseline weight, wherein each first modulation value is used to modulate the first baseline weight and each second modulation value is used to modulate the complement of the first baseline weight; and select a direction of modulation having an up value or a down value, wherein when the direction of modulation is the up value, the first baseline weight is modulated upward with an increase of the characteristic, and wherein when the direction of modulation is the down value, the first baseline weight is modulated downward with the increase of the characteristic.

The characteristic comprises is a first smoothness about the first predictor pixel and a second smoothness about the second predictor pixel.

Optionally, to determine respective first modulation values for respective first predictor pixels of the first predictor block comprises to identify a peak value for the first predictor block, and determine a first modulation value for a first predictor pixel based on a difference between the peak value and the first predictor pixel.

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 (i.e., original or source images) into blocks and generating a digital video output bitstream using one or more techniques to limit the information included in the output. A received encoded 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 temporal or 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 previously coded pixel values and those in the current block. In this way, only the residual and parameters used to generate the residual need be added to the encoded bitstream. The residual may be encoded using a lossy quantization step. Decoding (i.e., reconstructing) an encoded block from such a residual often results in a distortion between the original and the reconstructed block.

Encoding using spatial similarities can be known as intra prediction. Using an intra-prediction mode, intra prediction can attempt to predict the pixel values of a current block of a current frame of a video stream using pixels peripheral to the current block. The pixels peripheral to the current blocks are pixels within the current frame but that are outside the current block. The pixels peripheral to the block can be pixels adjacent to the current block. Which pixels peripheral to the block are used can depend on the intra-prediction mode and/or a scan order of the blocks of a frame. For example, in a raster scan order, peripheral pixels above a current block (i.e., the block being encoded or decoded) and/or peripheral pixels to the left of the current block may be used.

Encoding using temporal similarities can be known as inter prediction. Inter-prediction uses a motion vector that represents the temporal displacement of a previously coded block relative to the current block. The motion vector can be identified using a method of motion estimation, such as a motion search. In the motion search, a portion of a reference frame can be translated to a succession of locations to form a predictor block that can be subtracted from a portion of a current frame to form a series of residuals. The horizontal and/or vertical translations corresponding to the location having, e.g., the smallest, residual can be selected as the motion vector. The motion vector can be encoded in the encoded bitstream along with an indication of the reference frame.

In some situations, and to minimize the residual further, more than one predictor block can be combined to predict a current block. This may be known as compound prediction. Compound prediction can reduce, sometimes significantly, the residual error signal that is to be coded.

A compound predictor can be created by combining two or more predictors determined using the inter- and intra-prediction modes. For example, a compound predictor can be generated by combining an intra-generated predictor and an inter-generated predictor (i.e., intra+inter), by combining two intra-generated predictor blocks (i.e., intra+intra), or by combining two inter-generated predictor blocks (i.e., inter+inter). For example, compound inter frame prediction can employ a first motion vector to obtain a first predictor block from a first block of a first frame and a second motion vector to obtain a second predictor block from a second block of a second frame. The first frame and the second frame are known as reference frames. The reference frames can both be in the past, both in the future, or some combination thereof. The second motion vector can be independent of, or derived from, the first motion vector. An encoder conveys (e.g., encodes in an encoded bitstream) the first motion vector, the second motion vector, the first reference, and the second reference frame to a decoder. A compound predictor can use two or more predictor blocks.

In forming a compound predictor (e.g., in the case of two predictor blocks), a video codec (i.e., an encoder and/or a decoder) combines co-located pixels of a first predictor block and pixels of a second predictor block. For example, to obtain a pixel value for a pixel of the compound predictor block that is located at pixel position (row=r, column=c) of the compound predictor block, the video codec combines a first pixel value for a first pixel located at position (r, c) in the first predictor block with a second pixel value of a second pixel located at the position (r, c) in the second predictor block.

The combining can use the same weight mask for all pixels of the compound predictor block. That is, using a mask {w1, (<NUM> -w1)}, the weight w1 is applied to each pixel value of the first predictor block and the weight (<NUM>-w1) is applied to each pixel value of the second predictor block using equation (<NUM>): <MAT>.

In equation (<NUM>), current[r][c] is the pixel value of the pixel of the compound predictor block at position (r, c), p<NUM>[r][c] is the co-located pixel value in the first predictor block, and p<NUM>[r][c] is the co-located pixel value in the second predictor block. In an example, the pixels from the first predictor block and the second predictor block are equally weighted using the mask {½, ½}. In the mask {w1, (<NUM>-wl)}, the weight w1 can be referred to herein as the baseline weight and the weight (<NUM>-w1) can be referred to as the complementary baseline weight. Where more than two predictor blocks are used, the mask can contain more weight values. For example, the mask can include, explicitly or implicitly, a weight for each of the predictor blocks. The weights of the mask can add up to <NUM>.

In another example, the weights can vary based on a partitioning the first predictor block and a partitioning of the second predictor block. For example, the partitioning can be based on detecting edges in the first and second predictor blocks. In another example, the partitioning can be based on a partitioning of the first and second predictor blocks into quadrants or halves. The weights can be assigned based on which partition the first pixel value falls within in the first predictor block, which partition the second pixel value falls within in the second predictor block, or a combination thereof. As such, the weighting is spatially based (i.e., based on the position of a pixel). For example, in a case where the predictor blocks are partitioned into left sides and right sides, it may be that the left side of the first predictor block is a better predictor of the left side of the current block than the left side of the second predictor block. As such, pixel positions within the left side of the first predictor block can be weighed more. In any case, indications of the mask (i.e., the weight values) can be transmitted from the encoder to a decoder in the encoded bitstream. In an example, the indication of the mask may be transmitted implicitly. For example, the encoder and the decoder may be configured, a priori, to use a specific mask (e.g., the mask {<NUM>, <NUM>}). As such, the encoder need not encode the mask in the encoded bitstream. Encoding the mask can mean encoding the values of the mask or quantized values of the mask. Encoding the mask can mean encoding an indication of the mask. For example, the indication can be a mask index, as described below.

In implementations of this disclosure, compression performance may be improved by deriving the weights and/or by modulating the weights to be applied to pixels of the predictor blocks (i.e., when generating a compound predictor) from the values of the pixels of the predictor blocks themselves.

For example, as further illustrated below, the modulation values and/or weights to be applied to the pixels of the first predictor and the second predictor can be generated using a comparison (e.g., a difference) of the pixels of the predictor blocks.

For example, as further illustrated below, if a baseline weight w1 is to be used with a first predictor block, then modulation values can be determined using at least a subset of the pixels of the first predictor block. The modulation values can be applied to the baseline weight w1 when combining the predictor blocks to generate the compound predictor block. Different modulation values can be generated for each pixel of the first predictor block (and the second predictor block) using pixels of the first predictor block (and using the pixels of the second predictor block). Using pixels of the first predictor block means using the values of the pixels of the first predictor block.

A codec (i.e., an encoder and/or a decoder) can determine, at least partially, the weights to be applied for a compound prediction based on the pixel values of the predictor blocks. As a decoder can exactly recreate the predictor blocks (used by the encoder) using information conveyed by the encoder in the encoded bitstream, the same weights (i.e., derived weights) and the same final compound predictor block can be generated by the decoder without additional information relating to the weights to be applied to the pixels of the predictor blocks. Baseline weights (e.g., default, initial, average weights) can be conveyed in the encoded bitstream and the decoder can use the derived weights (i.e., modulation values) to modulate (i.e., adjust) the baseline weights.

As stated above, different weights can be used for each pixel and the weights can depend on the prediction signals (e.g., the pixel values of a predictor block) themselves. "Prediction signal" includes information indicative of at least one pixel value. A "pixel value" includes a value associated with a pixel, such as a color or luminosity. The different weights can be modulated (i.e., adjusted) weights of some base weight (i.e., a baseline weight). The baseline weight can be a weight that applies to each of the pixels of the predictor block. Contrastingly, a modulated weight is a weight that is calculated for a pixel. The disclosure herein applies equally to chrominance and luminance components and/or the red-green-blue (RGB) components of a pixel. That is, for example, modulated weights can be calculated for the chrominance components; and different or the same modulated weights can be determined for the chrominance components.

In the case of an inter-inter compound predictor block, given a first motion vector and a second motion vector, the first predictor block and the second predictor block can be respectively generated from a first reference frame and a second reference frame. The weights applied to the pixels of the first predictor block and the weights applied to the pixels of the second predictor block can depend on the nature (e.g., the pixel values) of the first predictor block and the second predictor block themselves. While two predictor blocks (i.e., a first predictor block and a second predictor block) are used herein, the teachings of this disclosure are not so limited. Any number of predictor blocks can be used for the dependent compound prediction modes for video coding.

As further described below, the encoder can convey, and the decoder can receive and use, additional information (which are described further below) in the encoded bitstream that further guide the weight generation process of the decoder. The weight generation process is the process of determining which respective weights to apply to pixels of the predictor blocks when the pixels of predictor blocks are combined via compound prediction. The additional information can include none, one, or more of a direction of adjustment of a baseline weight, whether to use a complementary mask, and one or more peak pixel values for at least some of the predictor blocks.

The direction of adjustment can indicate how a baseline weight is to be adjusted for a predictor pixel when calculating the compound pixel using the predictor pixel. For example, the direction of adjustment can indicate whether the baseline weight is to be adjusted up (i.e., increased in value) and down (i.e., decreased). For example, the direction of adjustment can indicate, for a predictor pixel of a predictor block, whether the baseline weight is to be modulated upward or downward as a characteristic of the predictor pixel increases or decreases. The characteristic, as further described below, can relate to pixel differences, smoothness of a pixel, or can relate to a peak pixel value. The direction of adjustment can indicate whether to increase or decrease the baseline weight as the pixel value differences or the relative smoothness differences increase or decrease between co-located pixels in the first predictor block and a second predictor block.

A complementary mask indicator can indicate that the weight mask {(<NUM>-w1), w1} instead of a standard weight mask {w1, (<NUM>-wl)} is to be applied to the first predictor block and the second predictor block respectively.

A peak pixel value indicated how the baseline weights are modulated based on a decaying function. The decaying function can have a maximum value at the peak pixel value and decays as the difference between a pixel value of a predictor block and the peak value increases. Other details are described herein after first describing an environment in which the disclosure may be implemented.

Dependent compound prediction modes for video coding is described herein first with reference to a system in which the teachings may be incorporated.

<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 Hypertext 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 of 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 networkbased 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, <NUM>×<NUM> 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> in accordance with 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 intra/inter 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 predictor block can be formed. In the case of intra-prediction, all or a part of a predictor 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 predictor block may be formed from samples in one or more previously constructed reference frames determined using motion vectors.

Next, still referring to <FIG>, the predictor block can be subtracted from the current block at the intra/inter 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 bottomright of the matrix. It is worth noting that the size of a predictor block, and hence the resulting residual block, may be different from the size of the transform block. For example, the predictor 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 predictor block that was predicted at the intra/inter 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> in accordance with 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 in <FIG> below. 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 intra/inter-prediction stage <NUM> to create the same predictor block as was created in the encoder <NUM>, e.g., at the intra/inter prediction stage <NUM>. At the reconstruction stage <NUM>, the predictor 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 an 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 compound motion prediction of a current block of pixels according to an implementation of this disclosure. The process <NUM> can be implemented in an encoder such as the encoder <NUM> or a decoder such as the decoder <NUM>.

The process <NUM> can be implemented, for example, as a software program that can be executed by computing devices such as transmitting 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>. In at least some implementations, the process <NUM> can be performed in whole or in part by the intra/inter prediction stage <NUM> of the encoder <NUM>.

The process <NUM> may be performed by a decoder such as the decoder <NUM>. The process <NUM> can be implemented, for example, as a software program that can be executed by computing devices such as the receiving station <NUM>. The process <NUM> can be performed in whole or in part by the intra/inter-prediction stage <NUM> of the decoder <NUM>. Implementations of the process <NUM> can be performed by storing instructions in a memory such as the memory <NUM> of the receiving station <NUM> to be executed by a processor such as CPU <NUM>, for example.

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.

The process <NUM> determines a pixel value for pixel position of the compound predictor block based on a weighting. The weighting can be based on first pixel values of a first predictor block and second pixel values of a second predictor block. The process <NUM> can determine a respective pixel value for each position of the compound predictor block. In an example, the process <NUM> determines at least a portion of a compound predictor block as a weighting of pixel values from two or more predictor blocks. The weighting of at least one of the predictor pixels values can be based on pixel values of the pixels in at least one of the predictor blocks.

At <NUM>, the process <NUM> determines a first predictor block and a second predictor block to predict the current block of pixels. As used herein, "determine" means to select, construct, identify, specify, receive, or determine in any manner whatsoever. For example, the process <NUM> can receive a first motion vector, a second motion vector, and reference frame information as described above with respect to the intra/inter prediction stage <NUM> of encoder <NUM> or the intra/inter-prediction stage <NUM> of decoder <NUM>. The process <NUM> accordingly determines a first predictor block and a second predictor block. Alternatively, the process <NUM> determines the first predictor block and the second predictor block by receiving the first and second predictor blocks, which were determined by a previous step. The first predictor block and the second predictor block can be any combination of inter+inter predictor blocks, inter+intra predictor blocks, or intra+intra predictor blocks. Any number (e.g., greater than two) of predictor blocks can be determined at <NUM>. The teachings herein apply to any number of predictor blocks.

At <NUM>, the process <NUM> determines a pixel value for a pixel of the compound predictor block of pixels based on a weighting that is based on pixel values of the first predictor block and pixel values of the second predictor block. As indicated above, the weighting for each pixel depends on the prediction signals themselves. That is, the weighting depends on the pixel values of the pixels of the first predictor block and the second predictor block. Non-limiting examples of weightings based on first pixel values of the first predictor block and second pixel values are now provided.

To minimize decoder complexity, it is desirable that the weight generation process be a simple one. The weighting for a predictor pixel (i.e., a pixel of the first predictor block or the second predictor block) can be modulated based on a characteristic of the predictor pixel. Examples of characteristics are provided below. Each of the predictor pixels (i.e., the predictor pixels to be combined to form the compound pixel of the compound predictor) can have a respective characteristic value for the characteristic. For example, in the case of two predictor blocks, a first characteristic value of the characteristic of a first predictor pixel of the first predictor block can be used to modulate a baseline weight, and a second characteristic value of the characteristic of a co-located second predictor pixel of the second predictor block can be used to modulate the baseline weight. The modulated baseline weights are then applied to the first predictor pixel and the second predictor pixel of the second predictor block to generate the compound predictor pixel. As indicated above, the first predictor pixel and the second predictor pixel are co-located.

In a first example, the weight generation process proceeds as follows: given the first predictor block and the second predictor block, and for each pixel position of the compound predictor block, the process <NUM> determines an absolute difference (e.g., the characteristic) between co-located pixels in the first predictor block and the second predictor block. The absolute difference can be used to set the weighting. In an implementation, a baseline weight can be modulated (e.g., adjusted, modified, scaled) based on the difference. As such, the weighting is further based on the baseline weight.

<FIG> is an example <NUM> of using pixel differences for modulating a baseline weight according to implementations of this disclosure. In this example, the difference between a first pixel of the first predictor block and a second pixel of the second predictor block is the characteristic used to modulate the weighting. The example <NUM> includes a first predictor block <NUM>, a second predictor block <NUM>, and a compound predictor block <NUM>. A pixel of the compound predictor block <NUM> is generated by combining co-located pixels of the predictor blocks (e.g., the first predictor block <NUM> and the second predictor block <NUM>). The pixel values of the compound predictor block <NUM> are to be derived based on a weighting of pixel values of the first predictor block <NUM> and the second predictor block <NUM>. The modulated weight for a pixel located at pixel position (r, c) of the compound predictor block <NUM> is calculated according to equation (<NUM>): <MAT>.

In equation <NUM>, modulated[r][c] is the weight (i.e., adjusted or modulated baseline weight) to be applied for a pixel value of the compound predictor block at location (r, c), p<NUM>[r][c] is the pixel value at location (r, c) in the first predictor block, p<NUM>[r][c] is the pixel value at location (r, c) in the second predictor block, weight is the baseline weight, and maxvalue is the highest possible pixel value. While "pixel values" is used herein, the teachings herein apply equally to color components of pixels. Color components can include the luminance and chrominance components. Color components can include the RGB color components of a pixel.

With the modulation function of equation (<NUM>), as the difference of the pixel values increases, the first predictor block is weighed more and the baseline weight (weight) approaches <NUM>. Also, as the difference of the pixel values increases, the second predictor block is weighed less (i.e., <NUM>- weight) and the baseline weight of the second predictor block approaches <NUM>. This is so because a positive value is added to the baseline weight (weight) used with the first predictor block. When respective pixels of the first predictor block and the second predictor block have the same value, the baseline weight (weight) (e.g., <NUM>) is used for the first predictor block pixel.

The modulation function of the example <NUM> is but one example of a modulation function. Other functions can be used. For example, another modulation function can adjust the baseline weight (weight) up or down depending on the difference instead of the absolute value of the difference.

An encoder can encode and a decoder can decode from the encoded bitstream a direction of modulation. The direction of modulation can indicate an up value and a down value. For example, the up value may be indicated with a bit value <NUM> and the down value may be indicated with a bit value <NUM>. Other indications are possible. When the direction of modulation is the up value, the first baseline weight is modulated upward with an increase of the difference between respective pixel values of the predictor block and the second predictor block. Such a modulation function weighs a pixel of the first predictor block higher as the difference increases. When the direction of modulation is the down value, the first baseline weight is modulated downward with the increase of the difference. Such a modulation, on the other hand, favors a pixel of the second predictor block - that is, by decreasing the first baseline weight of the first predictor block, the second baseline weight of the second predictor block is correspondingly increased as the sum of the first baseline weight and the second baseline weight is <NUM>.

When a baseline weight is indicated in the encoded bitstream, it can be assumed that the corresponding value of the weighting scheme is to be used with the first predictor block. For example, the baseline weight can be selected from a weighting scheme. An example of a weighting scheme includes the baseline weights {<NUM>, <NUM>, <NUM>, <NUM>}. A weighting scheme is the set of baseline weights that an encoder, decoder, or an encoder/decoder pair can use. If bits <NUM> are indicated, then the baseline weight (weight) <NUM> of the weighting scheme is to be used for the first predictor block and the complementary baseline weight <NUM> (i.e., (<NUM>- weight)) is to be used with the second predictor block. However, in some instances an encoder may determine that the complementary baseline weight is to be used with the first predictor block. As such, the encoder encodes in, and the decoder decodes from, the encoded bitstream a complementary mask indicator (i.e., a syntax element) to indicate that the first baseline weight is to be used with the second predictor block and that a second baseline weight (i.e., the complementary baseline weight) is to be used with the first predictor block. For example, if baseline scheme <NUM> (i.e., decimal value <NUM>) is indicated and the complementary mask signal is indicated, then the weight <NUM> is used with the first predictor block and the weight <NUM> is used with the second predictor block.

In the example <NUM>, a value of <NUM> is assumed for the baseline weight (weight) and the highest possible pixel value maxvalue is assumed to be <NUM>. Using the pixel <NUM> of the first predictor block (i.e., pixel value <NUM>) and the pixel <NUM> of the second predictor block (i.e., pixel value <NUM>), the modulated weight to be used for pixel <NUM> at pixel position (<NUM>, <NUM>) of the compound predictor block is calculated as follows: <MAT>.

And using the pixel <NUM> of the first predictor block (i.e., pixel value <NUM>) and the pixel <NUM> of the second predictor block (i.e., pixel value <NUM>), the modulated weight to be used for pixel <NUM> at pixel position (<NUM>, <NUM>) of the compound predictor block is calculated as follows: <MAT>.

Using the modulated weights, the pixel values of the compound predictor block can be calculated. The equation (<NUM>) can be used to calculate the pixel values. For example, the pixel values for the pixel <NUM> and the pixel <NUM> can be calculated as: <MAT> <MAT>.

Note that since pixel values are integer values, calculated pixel values can be either rounded or truncated - in the example above, the calculated values are rounded to the nearest integer.

The baseline weight (weight) can be provided to an encoder and to a decoder as a configuration. The baseline weight (weight) can be set in the encoder and the decoder. Alternatively, the baseline weight (weight) can be provided by the encoder to the decoder in the encoded bitstream. The encoder can encode an index of a baseline weight weight to be used by the decoder.

Referring again to the weighting scheme {<NUM>, <NUM>, <NUM>, <NUM>}, the encoder can indicate with <NUM> bits which baseline weight is to be used. That is, the encoder can indicate an index of a weight from a weighting scheme. The bits <NUM> can be encoded in the encoded bitstream to indicate the baseline weight <NUM>; and the bits <NUM> can be encoded to indicate that the <NUM> baseline weight is to be used. The baseline weight (weight) can indicate the baseline weight to be used for the first predictor block. Thus, a decoder can determine that a baseline weight (<NUM>- weight) is to be used for the second predictor block. As such, the baseline weight indicates a mask for a first baseline weight and a second baseline weight, namely the mask {weight, (<NUM>- weight)}. Alternatively, a baseline weight value (instead of encoding an index) can be encoded. For example, the weight can be the transmitted coarsely in the bitstream and can take a few distinct values based on the coarse transmission.

In a second example, the smoothness of the each predictor block around each pixel of the predictor block can be used to determine the weighting or to modulate a baseline weight. As such, the characteristic used for modulating the weighting can be a first smoothness about the first pixel of the first predictor block and a second smoothness about the second co-located pixel of the second predictor block.

The smoothness around a pixel can be indicative of noise around the pixel. For example, the higher the smoothness, the lower the noise; and the lower the smoothness, the higher the noise. If the local smoothness around a pixel location of one predictor block is higher than the local smoothness at the same pixel location of the other predictor block, the former predictor block can have a higher weight. Alternatively, when a baseline weight is used, the baseline weight for a smoother predictor pixel can be adjusted or modulated upward. The smoothness at a pixel position can be determined by examining the surrounding pixels. For example, smoothness at a pixel position can be determined using, for example, a 3x3 window centered at the pixel position. Any window size can be used. The smoothness around a pixel can be determined using statistics (e.g., range, standard deviation, etc.) of the 3x3 window around the pixel. Other methods for determining the smoothness can be used. The relative values of the first smoothness and the second smoothness can be used to modulate the baseline weights of the predictor blocks. For example, equation <NUM> can be used to modulate the baseline weights: <MAT>.

In equation <NUM>, modulated<NUM>[r][c], smoothness<NUM>[r][c], modulated<NUM>[r][c], and smoothness<NUM>[r][c] are, respectively, the modulated weight of a baseline weight (weight) for a first pixel at position (r, c) of the first predictor block, the smoothness at the first pixel position, the modulated weight for a second pixel at position (r, c) of the second predictor block, and the smoothness at the second pixel position. The weight is the baseline weight to be used with the first predictor block and (<NUM> - weight) is the baseline weight to be used with the second predictor block.

As described with respect to <FIG>, the baseline weight can be conveyed in the encoded bitstream. The baseline weight can be selected from a weighting scheme. A direction of modulation, as described with respect to <FIG>, can also be encoded by an encoder and decoded and used by a decoder. A complementary mask indicator, as described with respect to <FIG>, can also be encoded by an encoder and decode and used by a decoder.

In a third example, one (or more) peak pixel values for each predictor block can be used to determine modulation values. In an example, one peak value can be transmitted by the encoder for each predictor block of the compound prediction. The peak values can be encoded by the encoder using low precision (i.e., coarse approximations of the peak values). For example, the peak values can be gray scale pixel values that each can be communicated with a small number of bits (e.g., <NUM> or <NUM> bits). This embodiment can be useful when one color is better predicted from predictor block than the other. For a predictor block, a predictor pixel that is closer in value to the peak value can be weighed more than predictor pixels that are farther in value from the peak value.

The modulated weight for a pixel position of a predictor block can be obtained by a function that has a maximum value when a pixel value is equal or approximately equal to the peak value and decays as the difference between the pixel value and the peak pixel value increases. If a first pixel value of the first predictor block is closer (i.e., approximately equal in value) to the peak pixel value of the first predictor block than a co-located second pixel value of the second predictor block to the peak pixel value of the first predictor block, then it can be assumed that the first predictor is a more accurate predictor for the pixel of the current block than the second predictor block.

The final weighting for determining the value of a pixel of the compound predictor block can be obtained using the relative weighting of the modulated weights using equation (<NUM>): <MAT>.

In equation (<NUM>), w<NUM> and w<NUM> are the modulated baseline weights as determined using the described decaying function, p<NUM>[r][c] and p<NUM>[r]c] are, respectively, the pixel value at position (r, c) of the first predictor block and the second predictor block, and current[r][c] is the pixel at position (r, c) of the compound predictor block (i.e., the pixel to be predicted).

As described above, the process <NUM> can include decoding a baseline weight such that the weighting can be further based on the baseline weight. The baseline weight can indicate a mask including a first baseline weight and a second baseline weight. The first baseline weight can be used with the first prediction block and the second baseline weight can be used with the second prediction block. The baseline weight can indicate a weight from a weighting scheme including the weights <NUM>, <NUM>, <NUM>, and <NUM>. As described above, the weighting can be modulated based on a characteristic of a first pixel of the first prediction block and a co-located second pixel of the second prediction block. The characteristic can be a difference between the first pixel of the first prediction block and the second pixel of the second prediction block. The characteristic can be a first smoothness about the first pixel and a second smoothness about the second pixel. Also, as described above, the process <NUM> can decode a complementary mask indicator and, based on the complementary mask indicator, can use the first baseline weight with the second prediction block and use the second baseline weight used with the first prediction block.

As described above, the process <NUM> can decode a direction of modulation having an up value or a down value. When the direction of modulation is the up value, the first baseline weight is modulated upward with an increase of the difference. When the direction of modulation is the down value, the first baseline weight is modulated downward with the increase of the difference.

In an implementation, determining a pixel value for a pixel of the current block of pixels based on a weighting that is based on pixel values of the first prediction block and pixel values of the second prediction block can include identifying a first peak value for the first prediction block, determining a first weight for a first pixel of the first prediction block, and determining the pixel value based on at least the first weight and the first pixel.

<FIG> is a flowchart diagram of a process <NUM> for compound prediction using a first predictor block and a second predictor block to predict a current block of pixels according to an implementation of this disclosure. The process <NUM> can be implemented in an encoder such as the encoder <NUM>.

The process <NUM> can receive or determine a first predictor block and a second predictor block. Any number of predictor blocks can be used, not only a first predictor block and a second predictor block.

At <NUM>, the process <NUM> encodes a baseline weight. The baseline weight can be decoded and used by a decoder for generating the compound predictor block of pixels by weighing the first predictor block and the second predictor block. At <NUM>, the process <NUM> encodes a peak value for the first predictor block. The peak value and a first pixel value of the first predictor block are used to modulate the baseline weight for a co-located pixel value of the compound predictor block of pixels. The peak value is as described with respect to the third example above.

The process <NUM> can also include encoding a direction of modulation of the baseline weight. The process <NUM> can also include encoding an indication to use a complementary mask. In response to the indication being a first value, a decoder uses a first baseline weight with the first predictor block and uses a second baseline weight used with the second predictor block. In response to the indication being a second value, a decoder uses the first baseline weight with the second predictor block and uses the first baseline weight used with the second predictor block, and wherein a sum of the first baseline weight and the second baseline weight is one (<NUM>). The direction of modulation and the indication to use a complementary mask are as described above with respect to <FIG>.

<FIG> is a flowchart diagram of a process <NUM> for generating a compound predictor block of a current block of video according to a second implementation of this disclosure. The process <NUM> can be implemented in an encoder such as the encoder <NUM> or a decoder such as the decoder <NUM>.

At <NUM>, the process <NUM> generates, for a current block, predictor blocks including a first predictor block of first predictor pixels. The predictor blocks can be generated as described above with respect to the process <NUM>. At <NUM>, the process <NUM> determines, for a first predictor pixel of the first predictor pixels and using at least a subset of the first predictor pixels, a first modulation value for modulating a first weight to be applied to the first predictor pixel. At <NUM>, the process <NUM> generates the compound predictor block using the first predictor pixel, the first weight, and the first modulation value.

The first weight can be selected from a weighting scheme including the weights <NUM>, <NUM>, <NUM>, and <NUM>. Other weights are possible. When implemented by an encoder, the process <NUM> can encode the first weight in an encoded bitstream, such as the compressed bitstream <NUM> of <FIG>. When implemented by a decoder, the process <NUM> can decode the first weight from an encoded bitstream, such as the compressed bitstream <NUM> of <FIG>. The process <NUM> can code (i.e., encode when implemented by an encoder and decode when implemented by a decoder) the first weight by encoding an index of weight mask. The process <NUM> can code the first weight by encoding coarse value of the first weight.

In an example, the predictor blocks include a second predictor block of second predictor pixels. Generating the compound predictor block using the first predictor pixel and the first modulation value can include using, for a second predictor pixel of the second predictor pixels, a second modulation value for modulating a complement of the first weight. The second modulation value can be determined using at least a subset of the second predictor pixels. In an example, the first modulation value can be determined based on a difference between the first predictor pixel and the second predictor pixel. In an example, the first modulation value can be determined using a smoothness in a window around the first prediction pixel. The window can be a window centered at the first prediction pixel and is of size 3x3.

In an example, the first modulation value can be determined using a decaying function that has a maximum value at a predetermined pixel value of the first predictor block. The first prediction pixel can be input to the decaying function to determine the first modulation value.

<FIG> is a flowchart diagram of a process <NUM> for generating a compound predictor block according to a third implementation of this disclosure. The process <NUM> can be implemented by an encoder or a decoder as described with respect to the process <NUM>. The process <NUM> can be implemented as a software program as described with respect to the process <NUM>. The process <NUM> can be implemented using specialized hardware or firmware as described with respect to the process <NUM>.

At <NUM>, the process <NUM> generates a first predictor block and a second predictor block. The first predictor block includes first predictor pixels. The second predictor block includes second predictor pixels. At <NUM>, the process <NUM> determines respective first modulation values for respective first predictor pixels of the first predictor block. Each first modulation value is determined using at least some of the first predictor pixels. At <NUM>, the process <NUM> determines respective second modulation values for respective second pixels of the second predictor block. Each second modulation value is determined using at least some of the second predictor pixels. At <NUM>, the process <NUM> determines pixel values for pixels of the compound predictor block using the first predictor pixels, the first modulation values, the second predictor pixels, and the second modulation values.

In an example of the process <NUM>, the first modulation value for a first predictor pixel and the second modulation value for a second predictor pixel can be based on a characteristic of the first predictor pixel and the second predictor pixel. The first predictor pixel and the second predictor pixel are co-located. In an example, the characteristic can be a difference between the first predictor pixel and the second predictor pixel. The difference can be the absolute difference. In an example, the characteristic can be a first smoothness about the first predictor pixel and a second smoothness about the second predictor pixel. In an example, more than one characteristic can be combined. For example, the mask weights can be modulated based on any combination of pixel difference, smoothness, peak values, or any other characteristic.

In an example, the process <NUM> can decode, from an encoded bitstream, a baseline weight. The baseline weight can indicate a mask including a first baseline weight and a complement of the first baseline weight. In an example, each first modulation value can be used to modulate the first baseline weight and each second modulation value can be used to modulate the complement of the first baseline weight. The baseline weight can indicate a weight from a weighting scheme that includes the weights <NUM>, <NUM>, <NUM>, and <NUM>.

In an example, the process <NUM>, when implemented by an decoder, includes decoding a complementary mask indicator. Based on the complementary mask indicator, the process <NUM> can modulate the complement of the first baseline weight using each first modulation value and modulate the first baseline weight using each second modulation value.

In an example, the process <NUM> can include selecting a first baseline weight and a complement of the first baseline weight. Each first modulation value can be used to modulate the first baseline weight and each second modulation value can be used to modulate the complement of the first baseline weight. The process <NUM> can also include selecting a direction of modulation having an up value or a down value. When the direction of modulation is the up value, the first baseline weight is modulated upward with an increase of the characteristic. When the direction of modulation is the down value, the first baseline weight is modulated downward with the increase of the characteristic.

<FIG> is a flowchart diagram of a process <NUM> for decoding a current block according to a second implementation of this disclosure. The process <NUM> generates a compound prediction block for a current block.

At <NUM>, the process <NUM> generates a first predictor block and a second predictor block. At <NUM>, the process <NUM> decodes, from an encoded bitstream, such as the compressed bitstream <NUM> of <FIG>, a weight mask. At <NUM>, the process <NUM> determines, from the weight mask, a baseline weight to use as a first weight for pixels of the first predictor block and a complementary baseline weight to use as a second weight for pixels of the second predictor block. At <NUM>, the process <NUM> determines, for a first predictor pixel of the first predictor block, a first modulation value using at least some of the pixels of the first predictor block. The first modulation value can be used to modulate the baseline weight. At <NUM>, the process <NUM> determines, for a second predictor pixel of the second predictor block, a second modulation value using at least some of the pixels of the second predictor block. The second modulation value can be used to modulate the complementary baseline weight. The second predictor pixel is co-located with the first pixel predictor. At <NUM>, the process <NUM> generates a compound predictor that includes a third predictor pixel using the first predictor pixel, the second predictor pixel, the baseline weight, the complementary baseline weight, the first modulation value, and the second modulation value.

In an example, where the baseline weight has a first value and the complementary baseline weight has a second value, the process <NUM> can include decoding an indication to use a complementary mask, and, in response to the indication to use a complementary mask being a first value, using the second value as a value of the baseline weight and use the first value as a value of the complementary baseline weight, and the first value and the second value add 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 general purpose computer or general purpose 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>.

Further, all or a portion of implementations of the present disclosure can take the form of a computer program product accessible from, for example, a tangible computer-usable or computer-readable medium. A computer-usable or computer-readable medium can be any device that can, for example, tangibly contain, store, communicate, or transport the program for use by or in connection with any processor. The medium can be, for example, an electronic, magnetic, optical, electromagnetic, or a semiconductor device. Other suitable mediums are also available.

Claim 1:
A method for generating a compound predictor block (<NUM>) of a current block of video of a size M×N, comprising:
generating, for the current block, predictor blocks comprising a first predictor block (<NUM>) of the size M×N formed of first predictor pixels and a second predictor block (<NUM>) of the size M×N formed of second predictor pixels; and
determining, for first predictor pixels located at a position (r, c) of the first predictor pixels where r=<NUM> to M-<NUM> and c=<NUM> to N-<NUM> of the first predictor block, and using at least a subset of the first predictor pixels, respective first modulation values for modulating a first weight to be applied to the first predictor pixel,
wherein the first weight is used with all pixels of the first predictor pixels, wherein the first weight is a baseline weight to be modulated by the first modulation value, and
wherein each first modulation value is determined using:
<NUM>) a first smoothness indicative of noise about the respective first predictor pixel of the first predictor block (<NUM>) determined using a window centered around the first predictor pixel using less than all the pixels of the first predictor pixels; and
<NUM>) a second smoothness indicative of noise about a second predictor pixel located at the position (r, c) of the second predictor block (<NUM>), the second smoothness determined using a window centered around the second predictor pixel using less than all the pixels of the second predictor pixels, wherein the second predictor pixel is located in the second predictor block at the same location that the first predictor pixel is located in the first predictor block;
determine, for second predictor pixels located at a position (r, co) of the first predictor pixels where r=<NUM> to M-<NUM> and c=<NUM> to N-<NUM> of the second predictor block, and using at least a subset of the second predictor pixels, respective second modulation values,
wherein each second modulation value is determined using the first smoothness and the second smoothness; and
generating the compound predictor block (<NUM>) using the first predictor pixels, the first weight, the first modulation values, the second predictor pixels, and the second modulation values.