Patent Description:
One technique for compression uses a reference frame to generate a prediction block corresponding to a current block to be encoded. Differences between the prediction block and the current block can be encoded, instead of the values of the current block themselves, to reduce the amount of data encoded. Non-patent literature <NPL>) discloses sub-block based affine transform prediction including deriving a motion vector for each of a plurality of sub-blocks of a block, the motion vector of the center sample of each sub-block rounded to <NUM>/<NUM> fraction accuracy, and applying motion compensation interpolation filters to generate a prediction of each sub-block with the derived motion vector.

This disclosure relates generally to encoding and decoding video data and more particularly relates to rendering a motion field-based reference frame used for motion compensated prediction in video compression.

This disclosure describes encoding and decoding methods and apparatuses. A method according to an implementation of the disclosure includes determining a first frame to be predicted, the first frame being in a video sequence; determining a first reference frame from the video sequence for forward inter prediction of the first frame; determining a second reference frame from the video sequence for backward inter prediction of the first frame; determining a respective motion field for each of at least some blocks of the first frame using at least one of the first reference frame and the second reference frame; determining parameters forming an affine homographic model for a block of the first frame using the motion field for the block of the first frame, wherein the affine homographic model maps the block of the first frame to pixels in a reconstructed reference frame, the affine homographic model comprising a matrix of parameters defining a rotation and an associated vector defining a translation, which are obtained as a result of an optimization process defined by an objective function; generating a motion field-based reference frame, wherein generating a motion field-based reference frame includes generating a block of the motion field-based reference frame that is co-located with the block of the first frame by applying the affine homographic model to the block to populate pixel values of the reconstructed reference frame; and performing a prediction process for the first frame using the motion field-based reference frame.

An apparatus according to an implementation of the disclosure includes a non-transitory storage medium or memory and a processor. The medium includes instructions executable by the processor to carry out the method comprising determining a first frame to be predicted, the first frame being in a video sequence; determining a respective motion field for each of at least some blocks of the first frame using at least one of a first reference frame from the video sequence for forward inter prediction of the first frame or a second reference frame from the video sequence for backward inter prediction of the first frame; determining parameters forming an affine homographic model for a block of the first frame using the motion field for the block of the first frame, wherein the affine homographic model maps the block of the first frame to pixels in a reconstructed reference frame, the affine homographic model comprising a matrix of parameters defining a rotation and an associated vector defining a translation, which are obtained as a result of an optimization process defined by an objective function; generating a motion field-based reference frame, wherein generating a motion field- based reference frame includes generating a block of the motion field-based reference frame that is co-located with the block of the first frame by applying the affine homographic model to the block to populate pixel values of the reconstructed reference frame; and performing a prediction process for the first frame using the motion field-based reference frame.

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 described below wherein like reference numerals refer to like parts throughout the several views unless otherwise noted.

A video stream can be compressed by a variety of techniques to reduce bandwidth required transmit or store the video stream. A video stream can be encoded into a bitstream, which involves compression, and is then transmitted to a decoder that can decode or decompress the video stream to prepare it for viewing or further processing. Compression of the video stream often exploits spatial and temporal correlation of video signals through spatial and/or motion compensated prediction. Motion compensated prediction, for example, uses one or more motion vectors to generate a block (also called a prediction block) that resembles a current block to be encoded using previously encoded and decoded pixels. By encoding the motion vector(s), and the difference between the two blocks, a decoder receiving the encoded signal can re-create the current block. Motion compensated prediction may also be referred to as inter prediction.

Each motion vector used to generate a prediction block in the inter-prediction process refers to a frame other than a current frame, i.e., a reference frame. Reference frames can be located before or after the current frame in the sequence of the video stream, and may be frames that are reconstructed before being used as a reference frame. In some cases, there may be three or more reference frames used to encode or decode blocks of the current frame of the video sequence. One may be a frame that is referred to as a golden frame. Another may be a most recently encoded or decoded frame. Another may be an alternative reference frame that is encoded or decoded before one or more frames in a sequence, but which is displayed after those frames in an output display order. In this way, the alternative reference frame is a reference frame usable for backwards prediction. One or more forward and/or backward reference frames can be used to encode or decode a block. The efficacy of a reference frame when used to encode or decode a block within a current frame can be measured based on a resulting signal-to-noise ratio or other measures of rate-distortion.

In this technique, the pixels that form prediction blocks are obtained directly from one or more of the available reference frames. The reference pixel blocks or their linear combinations are used for prediction of the given coding block in the current frame. This direct, block-based prediction may not capture the true motion activity available from the reference frames. That is, motion other than translational motion, e.g., general affine motion of objects, is not efficiently captured. For this reason, motion compensated prediction accuracy can suffer.

To more fully utilize motion information from available bi-directional reference frames (e.g., one or more forward and one or more backward reference frames), implementations of the teachings herein describe the generation or rendering of a reference frame temporally co-located with the current coding frame using motion field estimation. This reference frame is referred to as a motion field-based reference frame herein.

Rendering the motion field-based reference frame involves initially building up a motion field estimation for the current frame via linear projection of the motion vectors from bi-directional reference frames. For any given block in the current frame, the estimated motion vectors assigned to it as well as its surrounding neighbors are available. Such closed boundary motion information allows a relatively precise estimate of an affine homographic model that maps the current block towards pixels in a reference frame. The resulting motion field-based reference frame is capable of handling a non-translational motion model.

Further details of rendering a motion field-based reference frame for use in video compression and reconstruction are described herein with initial reference to a system in which the teachings herein can 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 a non-transitory storage medium or 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 one 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 one 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 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 or non-transitory storage medium 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. Computing device <NUM> can also include a secondary storage <NUM>, which can, for example, be a memory card used with a mobile computing device. 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 one unit, other configurations can be utilized. The operations of the CPU <NUM> can be distributed across multiple machines (wherein individual machines can have 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 network-based memory or memory in multiple machines performing the operations of the computing device <NUM>. Although depicted here as one 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 an 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 planes or segments <NUM>. 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, a 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 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. Unless otherwise noted, the terms block and macroblock are used interchangeably herein.

<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 in <FIG>. The encoder <NUM> can also be implemented as specialized hardware included in, for example, the transmitting station <NUM>. In one particularly desirable implementation, the encoder <NUM> is a hardware encoder.

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, respective frames <NUM>, such as the frame <NUM>, can be processed in units of blocks. At the intra/inter prediction stage <NUM>, respective blocks can be encoded using intra-frame prediction (also called intra-prediction) or inter-frame prediction (also called inter-prediction). In any case, a prediction block can be formed. In the case of intra-prediction, 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, a prediction block may be formed from samples in one or more previously constructed reference frames. The designation of reference frames for groups of blocks is discussed in further detail below.

Next, still referring to <FIG>, the prediction 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. 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>. 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 compressed bitstream <NUM> can be formatted using various techniques, such as variable length coding (VLC) or arithmetic coding. 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 the encoder <NUM> and a decoder <NUM> (described below) use the same reference frames 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 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 can quantize the residual signal directly without the transform stage <NUM> for certain blocks or frames. In another implementation, an encoder can have the quantization stage <NUM> and the dequantization stage <NUM> combined in a common 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 in <FIG>. 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 post 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 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 prediction block as was created in the encoder <NUM>, e.g., at the intra/inter 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 post filtering stage <NUM> may be a deblocking filter that is applied to the reconstructed block to reduce blocking distortion. The result is output as the 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 post filtering stage <NUM>.

A reference frame buffer may store reference frames used to encode or decode blocks of frames of a video sequence. For example, reference frames may be identified as a last frame LAST_FRAME, a golden frame GOLDEN_FRAME, or an alternative reference frame ALTREF_FRAME. A frame header of a reference frame may include a virtual index to a location within the reference frame buffer at which the reference frame is stored. A reference frame mapping may map the virtual index of a reference frame to a physical index of memory at which the reference frame is stored. Where two reference frames are the same frame, those reference frames will have the same physical index even if they have different virtual indexes. The number and type of reference frames stored within a reference frame buffer may differ.

The reference frames stored in a reference frame buffer can be used to identify motion vectors for predicting blocks of frames to be encoded or decoded. Different reference frames may be used depending on the type of prediction used to predict a current block of a current frame. For example, in bi-prediction, blocks of the current frame can be forward predicted using either frame stored as the LAST_FRAME or the GOLDEN_FRAME, and backward predicted using a frame stored as the ALTREF_FRAME.

<FIG> is a diagram of a group of frames in a display order of the video sequence. In this example, the group of frames is preceded by a frame <NUM>, which can be referred to as a key frame or an overlay frame in some cases, and comprises eight frames <NUM> - <NUM>. No block within the frame <NUM> is inter predicted using reference frames of the group of frames. The frame <NUM> is a key (also referred to as intra-predicted frame) in this example, which refers to its status that predicted blocks within the frame are only predicted using intra prediction. However, the frame <NUM> can be an overlay frame, which is an inter-predicted frame that can be a reconstructed frame of a previous group of frames. In an inter-predicted frame, at least some of the predicted blocks are predicted using inter prediction. The number of frames forming each group of frames can vary according to the video spatial / temporal characteristics and other encoded configurations, such as the key frame interval selected for random access or error resilience, for example.

The coding order for each group of frames can differ from the display order. This allows a frame located after a current frame in the video sequence to be used as a reference frame for encoding the current frame. A decoder, such as the decoder <NUM>, may share a common group coding structure with an encoder, such as the encoder <NUM>. The group coding structure assigns different roles that respective frames within the group may play in the reference buffer (e.g., a last frame, an alternative reference frame, etc.) and defines or indicates the coding order for the frames within a group.

<FIG> is a diagram of an example of a coding order for the group of frames of <FIG>. The coding order of <FIG> is associated with a first group coding structure whereby a single backward reference frame is available for each frame of the group. Because the encoding and decoding order is the same, the order shown in <FIG> is generally referred to herein as a coding order. The key or overlay frame <NUM> is designated the golden frame in a reference frame buffer, such as the GOLDEN_FRAME in a reference frame buffer. The frame <NUM> is intra-predicted in this example, so it does not require a reference frame, but an overlay frame as the frame <NUM>, being a reconstructed frame from a previous group, also does not use a reference frame of the current group of frames. The final frame <NUM> in the group is designated an alternative reference frame in a reference frame buffer, such as the ALTREF_FRAME. In this coding order, the frame <NUM> is coded out of the display order after the frame <NUM> so as to provide a backward reference frame for each of the remaining frames <NUM> - <NUM>. In coding blocks of the frame <NUM>, the frame <NUM> serves as an available reference frame for blocks of the frame <NUM>. <FIG> is only one example of a coding order for a group of frames. Other group coding structures may designate one or more different or additional frames for forward and/or backward prediction.

As mentioned briefly above, an available reference frame may be a motion field-based reference frame portion rendered by a motion field. The motion field-based reference frame may be referred to as a co-located reference frame herein because the dimensions are the same as the current frame.

<FIG> is a flowchart diagram of a method or process <NUM> for motion compensated prediction of a frame of a video sequence using a reference frame rendered based on a motion field. The process <NUM> can be implemented, for example, as a software program that may be executed by computing devices such as transmitting station <NUM> or receiving station <NUM>. For example, the software program can include machine-readable instructions that may be stored in a memory such as the memory <NUM> or the secondary storage <NUM>, and that, when executed by a processor, such as CPU <NUM>, may cause the computing device to perform the process <NUM>. The process <NUM> can be implemented using specialized hardware or firmware. Some computing devices may have multiple memories or processors, and the operations described in the process <NUM> can be distributed using multiple processors, memories, or both.

At <NUM>, a current frame to be predicted is determined. Frames may be coded, and hence predicted, in any order, such as in the coding order shown in <FIG>. The frames to be predicted may also be referred to as a first, second, third, etc. frame. The label of first, second, etc., does not necessarily indicate an order of the frames. Instead the label is used to distinguish one current frame from another herein unless otherwise stated. At an encoder, the frame may be processed in units of blocks in a block coding order, such as a raster scan order. At a decoder, the frame may also be processed in units of blocks according to receipt of their encoded residuals within an encoded bitstream.

At <NUM>, forward and backward reference frames may be determined. In the examples described herein, the forward and backward reference frames are the nearest reconstructed frames before and after (e.g., in display order) the current frame, such as the current frame at frame index X described below. Although not expressly shown in <FIG>, if either a forward or backward reference frame does not exist, the process <NUM> may not be performed for the current frame. Instead, the current frame can be predicted according to any known technique (such as intra prediction or inter prediction using linear motion vectors).

Provided that forward and backward reference frames are used at <NUM>, the process <NUM> can advance to <NUM> to determine a motion field for the current frame. Determining the motion field may include performing linear projection of the motion vectors from the reference frames, which is described in more detail with reference to <FIG>.

<FIG> is a diagram used to explain linear projection of the motion vectors according to the teachings herein. The motion field of the current frame may be estimated using the nearest available reconstructed (e.g., reference) frames before and after the current frame, additional reference frames, or different reference frames. In <FIG>, the current frame has a frame index X. The motion field of the current frame includes motion vectors from the current frame towards, in this example, reference frames Ref0, Ref1, and Ref1_Ref0, or more reference frames if available. The motion vectors may be stored with regard to respective 8x8 blocks of the current frame, but different size blocks, or other portions of the current frame, may be considered, e.g., in the frame scan order. In other words, the description herein uses an 8x8 block to describe the processing at <NUM>, but this is an example only. The teachings may be applied to frame portions that are formed of other than blocks and to blocks of different sizes.

The reference frame Ref0 is a reference frame that may be used for forward prediction of the current frame, while the reference frame Ref1 is a reference frame that may be used for backward prediction of the current frame. Using the example of <FIG> for illustration, if the current frame is the frame <NUM>, the immediately preceding, or last, frame <NUM> (e.g., the reconstructed frame stored in a reference frame buffer as the LAST_FRAME) can be used as the reference frame Ref0, while the frame <NUM> (e.g., the reconstructed frame stored in a reference frame buffer as the ALTREF_FRAME) can be used as the reference frame Ref1.

Knowing the display indexes of the current and reference frames, motion vectors may be projected between the pixels in the reference frames Ref0 and Ref1 to the pixels in the current frame assuming that the motion field is linear in time. In the example described with regard to <FIG>, the frame index X for the current frame is <NUM>, the frame index A for the reference frame Ref0 is <NUM>, and the frame index C for the reference frame Ref1 is <NUM>. The frame index C_R0 for the reference frame Ref1_Ref0 may be <NUM>, for example.

Linear projection may be illustrated starting with reference frame Ref1, having a frame index C. From reference frame Ref1, a motion vector MV_ref1 goes from reference frame Ref1 to the reference frame for the reference frame Ref1, namely Ref1_Ref0, whose frame index is C_R0. A motion vector contains two components, a row and column, to represent the spatial offset. Accordingly, the block located at (ref_row, ref_col) within reference frame Ref1 was predicted using the motion vector MV_ref1 and reference frame Ref1_Ref0 in this example.

This motion vector MV_ref1 is projected onto the current frame to determine where the motion trajectory fits in the current frame. The block position offset is calculated accordingly to:
<MAT> and.

Block_col = ref_col + MV_ref1. col * (C - X) / (C - C_R0), where MV_ref1. row is a first (e.g., a vertical) component of the motion vector MV_ref1, and MV_ref1. col is a second (e.g., a horizontal) component of the motion vector MV_ref1. The projected block position within the current frame is (Block_row, Block_col).

Next, for the block position (Block_row, Block_col) in the current frame, its motion vector MV_0 is estimated towards reference frame Ref0 according to:
<MAT> and
<MAT> where MV_0. row is a first (e.g., a vertical) component of the motion vector MV_0, and MV_0. col is a second (e.g., a horizontal) component of the motion vector MV_0.

Similarly, the motion vector MV_1 is estimated towards reference frame Ref1 for the same block position (Block_row, Block_col) in the current frame according to:
<MAT> and
<MAT> where MV_1. row is a first (e.g., a vertical) component of the motion vector MV_1, and MV_1. col is a second (e.g., a horizontal) component of the motion vector MV_1.

The collection of motion vectors MV_0 and MV_1 for the blocks of the current frame forms the motion field for the current frame.

While in the example above, the linear projection used motion vectors of reference frame Ref1, this is an example only. The motion vectors of any other reference frame, such as reference frame Ref0 may be used.

Selecting the nearest available reconstructed forward and backward reference frames and assuming linear motion allows the motion field to be estimated at both an encoder and a decoder (e.g., at the intra/inter prediction stage <NUM> and the intra/inter prediction stage <NUM>) without transmitting extra information. Instead of the nearest available reconstructed reference frames, it is possible that different frames may be used as designated a priori between the encoder and decoder. In some implementations, identification of the frames for a current frame portion may be transmitted.

Referring back to <FIG>, after the motion field for the current frame is determined at <NUM>, the process <NUM> advances to <NUM>. At <NUM>, the motion field-based reference frame is generated or rendered. The motion field-based reference frame may be generated using the motion field. The motion field-based reference frame may be generated by rendering blocks of the motion field-based reference frame using the motion field (e.g., one or more affine homographic models determined using the motion field).

Rendering may include determining parameters that form an affine homographic model for respective blocks of the current frame, and solving the affine homographic model. <FIG> is a diagram used to explain an affine homographic model according to the teachings herein.

The diagram of <FIG> shows an example of a motion field associated with an 8x8 block of the frame being predicted that is denoted as the current block Cur_Blk. The motion field of the current block Cur_Blk is represented by MV0, and MV0 is shown extending from a central location in the current frame identified as (x0, y0). In this example, spatial neighboring blocks of the current block Cur_Blk are labeled Ref_blk_1, Ref_blk_2, Ref_blk_3, and Ref_blk_4. The motion fields of the spatial neighboring blocks Ref_blk_1, Ref_blk_2, Ref_blk_3, and Ref_blk_4 are represented by MV1, MV2, MV3, and MV4, respectively. A central location in the frame for the spatial neighboring block Ref_blk_1 is marked (x1, y1), a central location in the frame for the spatial neighboring block Ref_blk_2 is marked (x2, y2), a central location in the frame for the spatial neighboring block Ref_blk_3 is marked (x3, y3), and a central location in the frame for the spatial neighboring block Ref_blk_1 is marked (x4, y4).

The affine homographic model may be defined by a <NUM>-parameter matrix:
<MAT> and
<MAT>.

The parameters a, b, c, and d represent rotation and scaling, and the parameters e and f represent translational offsets in vertical and horizontal directions. To estimate these affine parameters for the current block Cur_Blk, the motion information for the spatial neighboring blocks may be used. The problem is formulated as:
<MAT>.

P is an array of the central positions of the spatial neighboring blocks, as follows:
<MAT>.

P' is an array of positions (x', y') in a reference frame, as follows:
<MAT>
where mv0_row is a first component of the motion vector MV0, mv0_col is a second component of the motion vector MV0, mv1_row is a first component of the motion vector MV1, mv1_col is a second component of the motion vector MV1, mv2_row is a first component of the motion vector MV2, mv2_col is a second component of the motion vector MV2, mv3_row is a first component of the motion vector MV3, mv3_col is a second component of the motion vector MV3, mv4_row is a first component of the motion vector MV4, and mv4_col is a second component of the motion vector MV4. Each first component can be a vertical component, and each second component can be a horizontal component.

Γ is a 1x5 vector whose entries are all ones, as follows:
<MAT>.

The subscript F in equation (<NUM>) refers to a general distance metric for two vectors (also called a norm). Examples of norms include F = <NUM>, the sum of absolute distances between each element; F = <NUM>, the sum of squared distances between each element; and F = infinite, a maximum distance across any pair of elements. In the implementations described herein, F = <NUM>.

The above optimization problem can be solved by doing the following two steps. In a first step, t̂ is fixed, and R is solved according to:
<MAT>.

In a second step, R is fixed, and t̂ is solved according to:
<MAT>.

The order of these steps can be reversed.

It is clear from the above formulation that the number of projection pairs needed to solve the affine homographic model can vary. This property can be useful when a (e.g., 8x8) block does not have all the motion field motion vectors around it available. For example, a block may be located along an edge of the frame. In such situations, the rank of P and P' may be reduced in the above equations.

The solution of equations (<NUM>) and (<NUM>) are the parameters a through f that form the affine homographic model for the current block Cur_Blk of the frame that is being predicted. The affine homographic model can then be used, together with a reconstructed reference frame, to render a block within a motion field-based reference frame.

The reference frame nearest to the current frame in natural order, such as the display order shown in <FIG>, may be selected as the reconstructed reference frame. In this way, the reconstructed reference frame may be the first reference frame for forward inter prediction used to generate the motion field, the second reference frame for backward inter prediction used to generate the motion field, or some other reference frame from the video sequence. In the example above where the current frame is the frame <NUM>, the frame <NUM> (the first reference frame) may be used as the closest reconstructed reference frame. The rendering may be processed in units of 8x8 blocks, for example.

Rendering a block within the motion field-based reference frame can include applying the affine homographic model to the block to populate pixel values for pixel positions of the block. Rendering the block can including mapping a pixel at a pixel position (x, y) in the block towards a pixel position (x', y') in the reconstructed reference frame by applying the affine homographic model to the block according to:
<MAT>
where B is the vector whose elements are the pixels positions of the block. The block may be co-located with a block (e.g., the current block Cur_Blk) of the frame being encoded that was used to generate the affine homographic model that is applied.

Rendering a block within the motion field-based reference frame can include, for each pixel position in the block, using the affine homographic model to map the pixel position in the block to the pixel position within the reconstructed reference frame, and generating the block for the motion field-based reference frame by assigning a pixel value of the pixel position within the reconstructed reference frame to the pixel position in the current block.

The processing at <NUM> can be repeated for each block of the motion field-based reference frame using a respective affine homographic model generated for the spatially co-located block of the frame being predicted. That is, each block comprising non-overlapping portions of the frame to be predicted can be processed to generating a respective affine homographic model for each block at <NUM>. Then, at <NUM>, the motion field-based reference frame may be generated by, for each of the blocks of the motion field-based reference frame, applying the respective affine homographic model for each block of the frame to a co-located block of the motion field-based reference frame to populate pixel positions within the co-located block using pixel values from the reconstructed reference frame.

At <NUM>, a prediction process is performed using the motion field-based reference frame generated at <NUM>. Performing a prediction process at an encoder can include generating a prediction block from a motion field-based reference frame for a current block of the frame. The motion field-based reference frame may be stored in a reference frame buffer within memory.

Generating the prediction block at an encoder can include performing a motion search within the motion field-based reference frame to select the best matching prediction block for the current block. However the prediction block is generated at the encoder, the resulting residual can be further processed, such as using the lossy encoding process described with regard to the encoder <NUM> of <FIG>.

At an encoder, the process <NUM> may form part of a rate distortion loop for the current block that uses various prediction modes, including one or more intra prediction modes and both single and compound inter prediction modes using the available prediction frames for the current frame. A single inter prediction mode uses only a single forward or backward reference frame for inter prediction. A compound inter prediction mode uses both a forward and a backward reference frame for inter prediction. In a rate distortion loop, the rate (e.g., the number of bits) used to encode the current block using respective prediction modes is compared to the distortion resulting from the encoding. The distortion may be calculated as the differences between pixel values of the block before encoding and after decoding. The differences can be a sum of absolute differences or some other measure that captures the accumulated error for blocks of the frames.

In some implementations, it may be desirable to limit the use of the motion field-based reference frame to the single inter prediction mode. That is, the motion field-based reference frame may be excluded as a reference frame in any compound reference mode. This can simplify the rate distortion loop, and little additional impact on the encoding of a block is expected because the motion field-based reference frame already considers both a forward and a backward reference frame. According to an implementation described herein, a flag may be encoded into the bitstream to indicate whether or not a motion field-based reference frame is available for use in encoding the current frame. The flag may be encoded when any single block within the current frame is encoded using a motion field-based reference frame block, in an example. Where the motion field-based reference frame is available for a current frame, it is possible to include an additional flag or other indicator (e.g., at the block level) indicating whether or not the current block was encoded by inter prediction using the motion field-based reference frame.

The prediction process at <NUM> may be repeated for all blocks of the current frame until the current frame is encoded.

In a decoder, performing a prediction process using the motion field-based reference frame at <NUM> may result from a determination that a motion field-based reference frame is available for decoding the current frame. In some implementations, the determination is made by inspecting a flag that indicates that at least one block of the current frame was encoded using the motion field-based reference frame. A residual corresponding to a current block to be reconstructed may be decoded. Performing the prediction process at <NUM> in the decoder can include generating a prediction block for the residual. Generating the prediction block can include using an inter-prediction mode decoded from the encoded bitstream, such as from a block header. A flag or indicator can be decoded to determine the inter-prediction mode. When the inter-prediction mode is a motion field-based reference frame mode (i.e., the block was inter-predicted using the motion field-based reference frame), the prediction block for the current block to be decoded is generated using pixels of the motion field-based reference frame and a motion vector mode and/or a motion vector. That is, for example, pixel positions of a prediction block may be determined using a motion vector of the prediction block that is determined from the encoded bitstream, and values for the pixel positions of the prediction block may be determined from the motion field-based reference frame.

The same processing to produce a motion field-based reference frame for use in a prediction process as part of decoding may be performed at a decoder, such as the decoder <NUM>, as was performed at the encoder. For example, when the flag indicates that at least one block of the current frame was encoded using the motion field-based reference frame, the entire motion field-based reference frame can be generated and stored for use in the prediction process. However, additional savings in computational power at the decoder may occur by modifying the process <NUM> to limit performance of the process <NUM> where coding blocks are identified as using the motion field-based reference frame as an inter-prediction reference frame. This may be described by reference to <FIG>, which is a diagram illustrating one technique for optimizing a decoder.

In <FIG>, pixels are shown along a grid <NUM> with w representing a pixel location along a first axis of the grid <NUM> and with y representing a pixel location along a second axis of the grid <NUM>. The grid <NUM> represents pixel locations of a portion of the current frame. To perform the prediction process at a decoder at <NUM>, the processing at <NUM> and <NUM> may be performed as part of the processing at <NUM>. For example, before performing the process starting at <NUM>, the prediction process at <NUM> can include finding pixel locations for the reference block used to encode the current block (e.g., from header information, such as a motion vector). In <FIG>, the motion vector for the current coding block <NUM> points to a reference block represented by the inner dashed line <NUM>. The current coding block <NUM> comprises 4x4 pixels in this example. The reference block location is shown by the dashed line <NUM> because the reference block is located in the reference frame, and not in the current frame, but its spatially co-located pixel locations in the current frame are used in the prediction process.

More specifically, once the reference block is located, all of the blocks that are spanned by (i.e., overlap) the pixel locations of the reference block are identified. This may include extending the reference block size by half of the filter length at each boundary to consider sub-pixel interpolation filters. In <FIG>, the sub-pixel interpolation filter length L is used to extend the reference block to the boundaries represented by the outer dashed line <NUM>. As is relatively common, the motion vector results in a reference block that does not align perfectly with the full-pel locations. The darkened area in <FIG> represents the full-pel locations. All of the reference blocks that overlap the full-pel locations are identified. Assuming the block sizes are the same as the current coding block <NUM>, a first reference block that is co-located with the current block, a second reference block that is above the first reference block, two reference blocks that extend from the left of the first reference block, and two reference blocks that extend from the left of the second reference block are identified.

Once the reference blocks are identified, the process <NUM> may be performed at <NUM> and <NUM> for only some blocks within the current frame so as to produce the co-located, motion field-based reference blocks. This can include blocks within the current frame that are co-located with the identified reference blocks, plus any blocks within the current frame that are co-located with spatial neighboring block(s) not already identified that are used for forming the affine homographic model for a block.

According to this modified process, it is ensured that the encoder and decoder have the same predictor while the decoder does not need to calculate the entirety of the co-located reference frame. It is worth noting that reference block(s) for a subsequent block, including any extended borders, may overlap one or more reference blocks identified in the decoding process of the current block. In this case, the motion field estimation need be performed for any of the identified blocks only once to further reduce computing requirements at the decoder. In other words, a reference block generated at <NUM> may be stored for use in decoding other blocks of the current frame. Accordingly, the motion field-based reference frame may include only some blocks with pixel values.

However the prediction block is generated at the decoder, the decoded residual for the current block from the encoded bitstream can be combined with the prediction block to form a reconstructed block as described by example with regard to the decoder <NUM> of <FIG>.

The prediction process at <NUM>, whether performed after or in conjunction with the processing at <NUM> and <NUM>, may be repeated for all blocks of the current frame that were encoded using a motion field-based reference frame until the current frame is decoded. When processing blocks in the decoding order, a block that is not encoded using a motion field-based reference frame can be conventionally decoded according to the prediction mode decoded for the block from the encoded bitstream.

The teachings herein provide various advantages for video compression performance. For example, the motion field effectively provides a closed boundary information for any block of interest, such that the affine homographic model can be estimated more precisely. The motion field rendered reference frame allows the encoder to run an effective motion search, resulting in good prediction quality. This co-located reference frame can be used to eliminate the use of a rendered frame may have <NUM> or <NUM> pixels offset from the current frame.

For simplicity of explanation, the process <NUM> is depicted and described as a series of steps or operations. However, the steps or operations in accordance with this disclosure can occur in various orders and/or concurrently. Additionally, other steps or operations not presented and described herein may be used. Furthermore, not all illustrated steps or operations may be required to implement a method in accordance with the disclosed subject matter.

The aspects of encoding and decoding described above illustrate some examples of 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 word "example" is used herein to mean serving as an example, instance, or illustration. Any aspect or design described herein as "example" is not necessarily to be construed as preferred or advantageous over other aspects or designs. Rather, use of the word "example" 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 the transmitting station <NUM> and/or the receiving station <NUM> (and the algorithms, methods, instructions, etc., stored thereon and/or executed thereby, including by the encoder <NUM> and the 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 the transmitting station <NUM> and the receiving station <NUM> do not necessarily have to be implemented in the same manner.

Further, in one aspect, for example, the transmitting station <NUM> or the 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 that contains other hardware for carrying out any of the methods, algorithms, or instructions described herein.

The transmitting station <NUM> and the receiving station <NUM> can, for example, be implemented on computers in a video conferencing system. Alternatively, the transmitting station <NUM> can be implemented on a server and the receiving station <NUM> can be implemented on a device separate from the server, such as a hand-held communications device. In this instance, the 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 the transmitting station <NUM>. Other suitable transmitting and receiving implementation schemes are available. For example, the 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 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, comprising:
determining a first frame to be predicted, the first frame being in a video sequence;
determining a first reference frame from the video sequence for forward inter prediction of the first frame;
determining a second reference frame from the video sequence for backward inter prediction of the first frame;
determining a respective motion field for each of at least some blocks of the first frame using at least one of the first reference frame and the second reference frame;
determining parameters forming an affine homographic model for a block of the first frame using the motion field for the block of the first frame, wherein the affine homographic model maps the block of the first frame to pixels in a reconstructed reference frame, the affine homographic model comprising a matrix of parameters defining a rotation and an associated vector defining a translation, which are obtained as a result of an optimization process defined by an objective function;
generating a motion field-based reference frame, wherein generating a motion field-based reference frame includes generating a block of the motion field-based reference frame that is co-located with the block of the first frame by applying the affine homographic model to the block to populate pixel values of the reconstructed reference frame; and
performing a prediction process for the first frame using the motion field-based reference frame.