Directional storage of reference motion field motion vectors
By ordering motion vectors in video encoding and decoding based on their directionality, the solution addresses high memory and computational burdens in conventional schemes, improving efficiency and reducing resource usage.
Patent Information
- Application Number
- PCT/US2025/032380
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2024-06-07
- Filing Date
- 2025-06-05
- Publication Date
- 2025-12-11
AI Technical Summary
Conventional video compression and decompression schemes face high memory bandwidth and computational expenses due to the large amount of information required for motion vector storage and access, particularly in hardware coders, as they do not differentiate between motion vectors usable for interpolation and extrapolation.
Implementing directional storage of reference motion field motion vectors by ordering them according to their directions (forward or backward) within a motion field, allowing only those usable for interpolation to be loaded into memory, thereby reducing memory bandwidth and computational requirements.
Significantly reduces memory bandwidth and computational expenses by optimizing motion vector storage and access, enhancing efficiency in video encoding and decoding processes.
Smart Images

Figure US2025032380_11122025_PF_FP_ABST
Abstract
Description
DIRECTIONAL STORAGE OF REFERENCE MOTION FIELD MOTIONVECTORSBACKGROUND
[0001] 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 usergenerated 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 encoding or decoding techniques.SUMMARY
[0002] Disclosed herein are, inter alia, systems and techniques for directional storage of reference motion field motion vectors.
[0003] A method according to an implementation of this disclosure comprises: identifying one or more motion vectors associated with a portion of a first frame of a video sequence; determining, for each of the one or more motion vectors, a direction of the motion vector; storing, within a portion of a motion field associated with the first frame, the one or more motion vectors in an order according to the directions of the one or more motion vectors; and providing the motion field including the stored one or more motion vectors for use with an inter-prediction of a second frame of the video sequence.
[0004] An apparatus according to an implementation of this disclosure comprises: a memory; and a processor configured to execute instructions stored in the memory to: determine, for each of one or more motion vectors associated with a portion of a first frame of a video sequence, a direction of the motion vector; store, in an order according to the directions of the one or more motion vectors, each of the one or more motion vectors within a slot associated with a portion of a motion field of the first frame; and provide the motion field including the stored one or more motion vectors for use with an inter-prediction of a second frame of the video sequence.
[0005] A non-transitory computer readable storage medium according to an implementation of this disclosure has stored thereon instructions that, when executed, cause a processor to: store, within a first slot associated with a portion of a motion field of a first frame of a video sequence, a first motion vector according to a direction of the first motion vector; store, within a second slot associated with the portion of the motion field, a second motion vector according to a direction of the second motion vector; and provide the motion field including the stored first and second motion vectors for use with an inter-prediction of a second frame of the video sequence.
[0006] These and other aspects of this disclosure are disclosed in the following detailed description of the implementations, the appended claims and the accompanying figures.BRIEF DESCRIPTION OF THE DRAWINGS
[0007] The description herein makes reference to the accompanying drawings described below, wherein like reference numerals refer to like parts throughout the several views.
[0008] FIG. 1 is a schematic of an example of a video encoding and decoding system.
[0009] FIG. 2 is a block diagram of an example of a computing device that can implement a transmitting station or a receiving station.
[0010] FIG. 3 is a diagram of an example of a video stream to be encoded and decoded.
[0011] FIG. 4 is a block diagram of an example of an encoder.
[0012] FIG. 5 is a block diagram of an example of a decoder.
[0013] FIG. 6 is an illustration of examples of portions of a video frame.
[0014] FIG. 7 is a block diagram of an example of motion field storage for video coding.
[0015] FIG. 8 is an illustration of an example of a grid of blocks of a motion field.
[0016] FIG. 9 is a flowchart diagram of an example of a technique for directional storage of reference motion field motion vectors.
[0017] FIG. 10 is a flowchart diagram of an example of a technique for performing interprediction by loading motion vectors from a motion field according to a prediction direction.DETAILED DESCRIPTION
[0018] Video compression schemes may include breaking respective images, or frames, of a video stream into smaller portions, such as blocks, and generating an encoded bitstream by using encoding techniques to limit the information included for respective blocks thereof. The bitstream can be decoded to re-create the source frames from the limited information. A video stream can be compressed (i.e., encoded) by a variety of techniques to reduce thebandwidth required to transmit or store the video stream. Similarly, a variety of techniques can be used to decompress (i.e., decode) a compressed video stream from a bitstream, to prepare the video stream 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 may also be referred to as interprediction. Inter-prediction 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 (i.e., a residual), a decoder receiving the encoded signal can reconstruct the current block by generating the prediction block and adding pixels of the prediction block to the decoded residual block. Inter-prediction may also be referred to as motion compensated prediction.
[0019] Each motion vector used to generate a prediction block in the inter-prediction process refers to a reference frame (i.e., a frame other than a current frame which includes the block that is under prediction). 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 particular, a reference frame may be a forward reference frame (i.e., a frame used for forward prediction relative to the sequence) or a backward reference frame (i.e., a frame used for backward prediction relative to the sequence). One or more forward and / or backward reference frames can be used to encode or decode a block. In particular, because many conventional video compression and decompression schemes use a pyramid coding structure to achieve high compression efficiencies, frames may be encoded and decoded using unidirectional prediction, such as using a forward reference frame or a backward reference frame, or using bi-directional prediction, such as using a forward reference frame and a backward reference frame.
[0020] Often, motion vectors determined and used for inter-prediction are stored in a motion vector reference buffer for future use, for example, to predict other motion vectors. To illustrate, assume a block in reference frame 0 refers to a block in reference frame 1 for inter-prediction, and the motion vector representing same is stored in a buffer. For a block in a current frame, if later necessary to predict the motion of that block to reference frame 1, the stored motion vector can be linearly projected to determine a predicted motion vector. Typically, motion vectors used by a given reference frame are stored in a grid of blocks representing or otherwise associated with a motion field of the reference frame, in which each block represents an MxN unit of pixels where M and N are both positive integers and may be the same or different. Per existing approaches, to enable compound prediction in whichmotion pointing to different reference frames may be used, up to two motion vectors can be stored for each block of the grid of blocks, alongside reference frame indices indicating the reference frames to which the stored motion vectors point. Since this motion field is determined for an individual reference frame of a video sequence, each such reference frame may have its own associated motion field. Generally, a motion field is independently determined at each of the encoder and the decoder and thus not signaled within a bitstream, although the motion vectors thereof may so be signaled.
[0021] To perform motion compensated prediction, then, the motion fields of multiple reference frames are loaded into memory and processed (e.g., using linear projection) to determine the predicted motion of a given block of a current frame that uses the reference frames. However, due at least to the large amount of information that must accordingly be accessed and loaded into memory given the number of reference frames and motion vectors involved, this process results in a large memory bandwidth requirement and may thus impose a highly burdensome computational expense, especially for hardware coders.
[0022] Moreover, through observation it has been empirically determined that certain stored motion vectors may be more helpful than others for motion vector prediction. In particular, empirical guidance suggests that motion vector prediction performed by motion vector extrapolation (i.e., the extrapolated projection of a motion vector at an angle not between two motion vectors used for the prediction) is generally less accurate than motion vector prediction performed by motion vector interpolation (i.e., the interpolated projection of a motion vector at an angle between two motion vectors used for the prediction). By example, to predict the motion of a current frame using the motion field of a backward reference frame of the current frame, it would be more desirable to use a motion vector that points from that backward reference frame to a future reference frame of the current frame (i.e., interpolation) than a motion vector that points to another backward reference frame (i.e., via extrapolation).
[0023] Given this, and to reduce the memory bandwidth requirement described above for motion compensated prediction using motion field motion vectors, it would be desirable to load into memory only those motion field motion vectors that would be usable via interpolation. By limiting such loading into memory to motion vectors usable for interpolation, the other motion vectors are not loaded into memory, thereby saving potentially substantial memory bandwidth and preserving potentially substantial computing resources, especially in the hardware coder use case. However, existing approaches to motion vector storage do not provide any indication as to the directions that the stored motion vectors point. Thus, under such existing approaches, it is simply not possible to achieve this desirableoutcome. Similarly, it is not desirable to instead read the reference frame index of each motion vector of a motion field and then decide whether to load the motion vectors on that basis, as this process is preferably performed in batches for an entire superblock altogether.
[0024] Implementations of this disclosure address problems such as these using directional storage of reference motion field motion vectors. In particular, according to the implementations of this disclosure, motion vectors stored within a motion field of a current reference frame are stored in an order according to their directions, which may be forward (i.e., where a given motion vector points to a forward reference frame of the current reference frame) or backward (i.e., where a given motion vector points to a backward reference frame of the current reference frame). An ordering scheme may thus be used to indicate the direction of a stored motion vector without requiring the signaling of additional data representing such direction. The implementations of this disclosure may be performed with respect to one or more motion fields of a video sequence. A given such motion field includes a number of portions, each corresponding to a different block (e.g., unit of pixels) and each having associated therewith one or more (e.g., two) motion vectors each stored in a slot for the given portion. For example, each portion of the motion field may have two slots each configured for motion vector storage.
[0025] Where the motion vectors associated with a portion of the motion field point in different directions, the one pointing to the past (i.e., the backward motion vector) is stored in a first slot of the portion and the one pointing to the future (i.e., the forward motion vector) is stored in a second slot of the portion. The first slot of a given portion may thus be considered the default slot for the backward direction and the second slot thereof may thus be considered the default slot for the forward direction. Where both motion vectors associated with a portion of the motion field point in a same direction (i.e., both to the past or to the future), the one that points to a closer reference frame relative to the current reference frame is stored in its default slot and the other one (i.e., the one that points to a farther reference frame relative to the current reference frame) is stored in the remaining slot. Where only one motion vector associated with a portion of the motion field is valid, it is stored in both the first and second slots.
[0026] The implementations of this disclosure address systems and techniques usable for motion compensated prediction and thus may be implemented by a prediction stage of an encoder or a decoder. Moreover, in that motion field determination is independently performed at each of an encoder and a decoder, the implementations of this disclosure may be independently practiced at either an encoder or a decoder. In either case, when loadingmotion vectors into memory according to the implementations of this disclosure, a desired direction for prediction (i.e., a motion vector direction that supports interpolation rather than extrapolation) may be determined for a given prediction and the motion vectors stored in the corresponding slot throughout a reference frame motion field may be accessed and loaded into memory. This may result in significant memory bandwidth and computational expense savings.
[0027] While reference is made herein by example to superblocks, macroblocks, blocks, and the like, as are commonly used in video codecs such as VP9, AVI, and the currently indevelopment AV2, the implementations of this disclosure may be used with other video coding structures. In one particular but non-limiting example, the implementations of this disclosure may be used with CTUs, CUs, PUs, and the like, as are commonly used in video codecs such as H.265, referred to as High-Efficiency Video Coding, and H.266, referred to as Versatile Video Coding. Accordingly, references herein to particular video coding structures such as superblocks, macroblocks, blocks, and the like shall be regarded as expressions of non-limiting example video coding structures with which the implementations of this disclosure may be used.
[0028] Further details of techniques for directional storage of reference motion field motion vectors are described herein with initial reference to a system in which such techniques can be implemented. FIG. 1 is a schematic of an example of a video encoding and decoding system 100. A transmitting station 102 can be, for example, a computer having an internal configuration of hardware such as that described in FIG. 2. However, other implementations of the transmitting station 102 are possible. For example, the processing of the transmitting station 102 can be distributed among multiple devices.
[0029] A network 104 can connect the transmitting station 102 and a receiving station 106 for encoding and decoding of the video stream. Specifically, the video stream can be encoded in the transmitting station 102, and the encoded video stream can be decoded in the receiving station 106. The network 104 can be, for example, the Internet. The network 104 can also be a local area network (FAN), wide area network (WAN), virtual private network (VPN), cellular telephone network, or any other means of transferring the video stream from the transmitting station 102 to, in this example, the receiving station 106.
[0030] The receiving station 106, in one example, can be a computer having an internal configuration of hardware such as that described in FIG. 2. However, other suitable implementations of the receiving station 106 are possible. For example, the processing of the receiving station 106 can be distributed among multiple devices.
[0031] Other implementations of the video encoding and decoding system 100 are possible. For example, an implementation can omit the network 104. In another implementation, a video stream can be encoded and then stored for transmission at a later time to the receiving station 106 or any other device having memory. In one implementation, the receiving station 106 receives (e.g., via the network 104, 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 104. In another implementation, a transport protocol other than RTP may be used (e.g., a Hypertext Transfer Protocol-based (HTTP-based) video streaming protocol).
[0032] When used in a video conferencing system, for example, the transmitting station 102 and / or the receiving station 106 may include the ability to both encode and decode a video stream as described below. For example, the receiving station 106 could be a video conference participant who receives an encoded video bitstream from a video conference server (e.g., the transmitting station 102) to decode and view and further encodes and transmits his or her own video bitstream to the video conference server for decoding and viewing by other participants.
[0033] In some implementations, the video encoding and decoding system 100 may instead be used to encode and decode data other than video data. For example, the video encoding and decoding system 100 can be used to process image data. The image data may include a block of data from an image. In such an implementation, the transmitting station 102 may be used to encode the image data and the receiving station 106 may be used to decode the image data.
[0034] Alternatively, the receiving station 106 can represent a computing device that stores the encoded image data for later use, such as after receiving the encoded or preencoded image data from the transmitting station 102. As a further alternative, the transmitting station 102 can represent a computing device that decodes the image data, such as prior to transmitting the decoded image data to the receiving station 106 for display.
[0035] FIG. 2 is a block diagram of an example of a computing device 200 that can implement a transmitting station or a receiving station. For example, the computing device 200 can implement one or both of the transmitting station 102 and the receiving station 106 of FIG. 1. The computing device 200 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, andthe like.
[0036] A processor 202 in the computing device 200 can be a conventional central processing unit. Alternatively, the processor 202 can be another type of device, or multiple devices, capable of manipulating or processing information now existing or hereafter developed. For example, although the disclosed implementations can be practiced with one processor as shown (e.g., the processor 202), advantages in speed and efficiency can be achieved by using more than one processor.
[0037] A memory 204 in computing device 200 can be a read only memory (ROM) device or a random access memory (RAM) device in an implementation. However, other suitable types of storage device can be used as the memory 204. The memory 204 can include code and data 206 that is accessed by the processor 202 using a bus 212. The memory 204 can further include an operating system 208 and application programs 210, the application programs 210 including at least one program that permits the processor 202 to perform the techniques described herein. For example, the application programs 210 can include applications 1 through N, which further include encoding and / or decoding software that performs, amongst other things, directional storage of reference motion field motion vectors as described herein.
[0038] The computing device 200 can also include a secondary storage 214, 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 214 and loaded into the memory 204 as needed for processing.
[0039] The computing device 200 can also include one or more output devices, such as a display 218. The display 218 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 218 can be coupled to the processor 202 via the bus 212. Other output devices that permit a user to program or otherwise use the computing device 200 can be provided in addition to or as an alternative to the display 218. 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 a light emitting diode (LED) display, such as an organic LED (OLED) display.
[0040] The computing device 200 can also include or be in communication with an image-sensing device 220, for example, a camera, or any other image-sensing device 220 now existing or hereafter developed that can sense an image such as the image of a useroperating the computing device 200. The image-sensing device 220 can be positioned such that it is directed toward the user operating the computing device 200. In an example, the position and optical axis of the image-sensing device 220 can be configured such that the field of vision includes an area that is directly adjacent to the display 218 and from which the display 218 is visible.
[0041] The computing device 200 can also include or be in communication with a soundsensing device 222, for example, a microphone, or any other sound-sensing device now existing or hereafter developed that can sense sounds near the computing device 200. The sound-sensing device 222 can be positioned such that it is directed toward the user operating the computing device 200 and can be configured to receive sounds, for example, speech or other utterances, made by the user while the user operates the computing device 200.
[0042] Although FIG. 2 depicts the processor 202 and the memory 204 of the computing device 200 as being integrated into one unit, other configurations can be utilized. The operations of the processor 202 can be distributed across multiple machines (wherein individual machines can have one or more processors) that can be coupled directly or across a local area or other network. The memory 204 can be distributed across multiple machines such as a network-based memory or memory in multiple machines performing the operations of the computing device 200.
[0043] Although depicted here as one bus, the bus 212 of the computing device 200 can be composed of multiple buses. Further, the secondary storage 214 can be directly coupled to the other components of the computing device 200 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 200 can thus be implemented in a wide variety of configurations.
[0044] FIG. 3 is a diagram of an example of a video stream 300 to be encoded and decoded. The video stream 300 includes a video sequence 302. At the next level, the video sequence 302 includes a number of adjacent video frames 304. While three frames are depicted as the adjacent frames 304, the video sequence 302 can include any number of adjacent frames 304. The adjacent frames 304 can then be further subdivided into individual video frames, for example, a frame 306.
[0045] At the next level, the frame 306 can be divided into a series of planes or segments 308. The segments 308 can be subsets of frames that permit parallel processing, for example. The segments 308 can also be subsets of frames that can separate the video data into separate colors. For example, a frame 306 of color video data can include a luminance plane and twochrominance planes. The segments 308 may be sampled at different resolutions.
[0046] Whether or not the frame 306 is divided into segments 308, the frame 306 may be further subdivided into blocks 310, which can contain data corresponding to, for example, MxN pixels in the frame 306, in which M and N may refer to the same positive integer value or to different positive integer values. The blocks 310 can also be arranged to include data from one or more segments 308 of pixel data. The blocks 310 can be of any suitable size, such as 4x4 pixels, 8x8 pixels, 16x8 pixels, 8x16 pixels, 16x16 pixels, or larger up to a maximum block size, which may be 128x128 pixels or another MxN pixels size.
[0047] FIG. 4 is a block diagram of an example of an encoder 400. The encoder 400 can be implemented, as described above, in the transmitting station 102, such as by providing a computer software program stored in memory, for example, the memory 204. The computer software program can include machine instructions that, when executed by a processor such as the processor 202, cause the transmitting station 102 to encode video data in the manner described in FIG. 4. The encoder 400 can also be implemented as specialized hardware included in, for example, the transmitting station 102. In some implementations, the encoder 400 is a hardware encoder.
[0048] The encoder 400 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 420 using the video stream 300 as input: an intra / inter prediction stage 402, a transform stage 404, a quantization stage 406, and an entropy encoding stage 408. The encoder 400 may also include a reconstruction path (shown by the dotted connection lines) to reconstruct a frame for encoding of future blocks. In FIG. 4, the encoder 400 has the following stages to perform the various functions in the reconstruction path: a dequantization stage 410, an inverse transform stage 412, a reconstruction stage 414, and a loop filtering stage 416. Other structural variations of the encoder 400 can be used to encode the video stream 300.
[0049] In some cases, the functions performed by the encoder 400 may occur after a filtering of the video stream 300. That is, the video stream 300 may undergo pre-processing according to one or more implementations of this disclosure prior to the encoder 400 receiving the video stream 300. Alternatively, the encoder 400 may itself perform such preprocessing against the video stream 300 prior to proceeding to perform the functions described with respect to FIG. 4, such as prior to the processing of the video stream 300 at the intra / inter prediction stage 402.
[0050] When the video stream 300 is presented for encoding after the pre-processing isperformed, respective adjacent frames 304, such as the frame 306, can be processed in units of blocks. At the intra / inter prediction stage 402, 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 intraprediction, 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.
[0051] Next, the prediction block can be subtracted from the current block at the intra / inter prediction stage 402 to produce a residual block (also called a residual). The transform stage 404 transforms the residual into transform coefficients in, for example, the frequency domain using block-based transforms. The quantization stage 406 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.
[0052] The quantized transform coefficients are then entropy encoded by the entropy encoding stage 408. The entropy-encoded coefficients, together with other information used to decode the block (which may include, for example, syntax elements such as used to indicate the type of prediction used, transform type, motion vectors, a quantizer value, or the like), are then output to the compressed bitstream 420. The compressed bitstream 420 can be formatted using various techniques, such as variable length coding or arithmetic coding. The compressed bitstream 420 can also be referred to as an encoded video stream or encoded video bitstream, and the terms will be used interchangeably herein.
[0053] The reconstruction path (shown by the dotted connection lines) can be used to ensure that the encoder 400 and a decoder 500 (described below with respect to FIG. 5) use the same reference frames to decode the compressed bitstream 420. The reconstruction path performs functions that are similar to functions that take place during the decoding process (described below with respect to FIG. 5), including dequantizing the quantized transform coefficients at the dequantization stage 410 and inverse transforming the dequantized transform coefficients at the inverse transform stage 412 to produce a derivative residual block (also called a derivative residual).
[0054] At the reconstruction stage 414, the prediction block that was predicted at the intra / inter prediction stage 402 can be added to the derivative residual to create a reconstructed block. The loop filtering stage 416 can apply an in-loop filter or other filter to the reconstructed block to reduce distortion such as blocking artifacts. Examples of filterswhich may be applied at the loop filtering stage 416 include, without limitation, a deblocking filter, a directional enhancement filter, and a loop restoration filter.
[0055] Other variations of the encoder 400 can be used to encode the compressed bitstream 420. In some implementations, a non-transform based encoder can quantize the residual signal directly without the transform stage 404 for certain blocks or frames. In some implementations, an encoder can have the quantization stage 406 and the dequantization stage 410 combined in a common stage.
[0056] FIG. 5 is a block diagram of an example of a decoder 500. The decoder 500 can be implemented in the receiving station 106, for example, by providing a computer software program stored in the memory 204. The computer software program can include machine instructions that, when executed by a processor such as the processor 202, cause the receiving station 106 to decode video data in the manner described in FIG. 5. The decoder 500 can also be implemented in hardware included in, for example, the transmitting station 102 or the receiving station 106. In some implementations, the decoder 500 is a hardware decoder.
[0057] The decoder 500, similar to the reconstruction path of the encoder 400 discussed above, includes in one example the following stages to perform various functions to produce an output video stream 516 from the compressed bitstream 420: an entropy decoding stage 502, a dequantization stage 504, an inverse transform stage 506, an intra / inter prediction stage 508, a reconstruction stage 510, a loop filtering stage 512, and a post filter stage 514. Other structural variations of the decoder 500 can be used to decode the compressed bitstream 420.
[0058] When the compressed bitstream 420 is presented for decoding, the data elements within the compressed bitstream 420 can be decoded by the entropy decoding stage 502 to produce a set of quantized transform coefficients. The dequantization stage 504 dequantizes the quantized transform coefficients (e.g., by multiplying the quantized transform coefficients by the quantizer value), and the inverse transform stage 506 inverse transforms the dequantized transform coefficients to produce a derivative residual that can be identical to that created by the inverse transform stage 412 in the encoder 400. Using header information decoded from the compressed bitstream 420, the decoder 500 can use the intra / inter prediction stage 508 to create the same prediction block as was created in the encoder 400 (e.g., at the intra / inter prediction stage 402).
[0059] At the reconstruction stage 510, the prediction block can be added to the derivative residual to create a reconstructed block. The loop filtering stage 512 can be applied to the reconstructed block to reduce blocking artifacts. Examples of filters which may beapplied at the loop filtering stage 512 include, without limitation, a deblocking filter, a directional enhancement filter, and a loop restoration filter. Other filtering can be applied to the reconstructed block. In this example, the post filter stage 514 is applied to the reconstructed block to reduce blocking distortion, and the result is output as the output video stream 516. The output video stream 516 can also be referred to as a decoded video stream, and the terms will be used interchangeably herein.
[0060] Other variations of the decoder 500 can be used to decode the compressed bitstream 420. In some implementations, the decoder 500 can produce the output video stream 516 without the post filter stage 514 or otherwise omit the post filter stage 514.
[0061] FIG. 6 is an illustration of examples of portions of a video frame 600, which may, for example, be the frame 306 shown in FIG. 3. The video frame 600 includes a number of 64x64 blocks 610, such as four 64x64 blocks 610 in two rows and two columns in a matrix or Cartesian plane, as shown. Each 64x64 block 610 may include up to four 32x32 blocks 620. Each 32x32 block 620 may include up to four 16x16 blocks 630. Each 16x16 block 630 may include up to four 8x8 blocks 640. Each 8x8 block 640 may include up to four 4x4 blocks 650. Each 4x4 block 650 may include 16 pixels, which may be represented in four rows and four columns in each respective block in the Cartesian plane or matrix. In some implementations, the video frame 600 may include blocks larger than 64x64 and / or smaller than 4x4. Subject to features within the video frame 600 and / or other criteria, the video frame 600 may be partitioned into various block arrangements.
[0062] The pixels may include information representing an image captured in the video frame 600, such as luminance information, color information, and location information. In some implementations, a block, such as a 16x16 pixel block as shown, may include a luminance block 660, which may include luminance pixels 662; and two chrominance blocks 670, 680, such as a U or Cb chrominance block 670, and a V or Cr chrominance block 680. The chrominance blocks 670, 680 may include chrominance pixels 690. For example, the luminance block 660 may include 16x16 luminance pixels 662 and each chrominance block 670, 680 may include 8x8 chrominance pixels 690 as shown. Although one arrangement of blocks is shown, any arrangement may be used. Although FIG. 6 shows NxN blocks, in some implementations, NxM blocks may be used, wherein N and M are different numbers. For example, 32x64 blocks, 64x32 blocks, 16x32 blocks, 32x16 blocks, or any other size blocks may be used. In some implementations, Nx2N blocks, 2NxN blocks, or a combination thereof, may be used.
[0063] In some implementations, coding the video frame 600 may include ordered block-level coding. Ordered block-level coding may include coding blocks of the video frame 600 in an order, such as raster-scan order, wherein blocks may be identified and processed starting with a block in the upper left comer of the video frame 600, or portion of the video frame 600, and proceeding along rows from left to right and from the top row to the bottom row, identifying each block in turn for processing. For example, the 64x64 block in the top row and left column of the video frame 600 may be the first block coded and the 64x64 block immediately to the right of the first block may be the second block coded. The second row from the top may be the second row coded, such that the 64x64 block in the left column of the second row may be coded after the 64x64 block in the rightmost column of the first row.
[0064] In some implementations, coding a block of the video frame 600 may include using quad-tree coding, which may include coding smaller block units within a block in raster- scan order. For example, the 64x64 block shown in the bottom left corner of the portion of the video frame 600 may be coded using quad-tree coding wherein the top left 32x32 block may be coded, then the top right 32x32 block may be coded, then the bottom left 32x32 block may be coded, and then the bottom right 32x32 block may be coded. Each 32x32 block may be coded using quad- tree coding wherein the top left 16x16 block may be coded, then the top right 16x16 block may be coded, then the bottom left 16x16 block may be coded, and then the bottom right 16x16 block may be coded. Each 16x16 block may be coded using quad-tree coding wherein the top left 8x8 block may be coded, then the top right 8x8 block may be coded, then the bottom left 8x8 block may be coded, and then the bottom right 8x8 block may be coded. Each 8x8 block may be coded using quad-tree coding wherein the top left 4x4 block may be coded, then the top right 4x4 block may be coded, then the bottom left 4x4 block may be coded, and then the bottom right 4x4 block may be coded. In some implementations, 8x8 blocks may be omitted for a 16x16 block, and the 16x16 block may be coded using quad-tree coding wherein the top left 4x4 block may be coded, then the other 4x4 blocks in the 16x16 block may be coded in raster-scan order.
[0065] In some implementations, coding the video frame 600 may include encoding the information included in the original version of the image or video frame by, for example, omitting some of the information from that original version of the image or video frame from a corresponding encoded image or encoded video frame. For example, the coding may include reducing spectral redundancy, reducing spatial redundancy, or a combination thereof. Reducing spectral redundancy may include using a color model based on a luminance component (Y) and two chrominance components (U and V or Cb and Cr), which may be referred to as the YUV or YCbCr color model, or color space. Using the YUV color modelmay include using a relatively large amount of information to represent the luminance component of a portion of the video frame 600, and using a relatively small amount of information to represent each corresponding chrominance component for the portion of the video frame 600. For example, a portion of the video frame 600 may be represented by a high-resolution luminance component, which may include a 16x16 block of pixels, and by two lower resolution chrominance components, each of which represents the portion of the image as an 8x8 block of pixels. A pixel may indicate a value, for example, a value in the range from 0 to 255, and may be stored or transmitted using, for example, eight bits. Although this disclosure is described in reference to the YUV color model, another color model may be used. Reducing spatial redundancy may include transforming a block into the frequency domain using, for example, a discrete cosine transform. For example, a unit of an encoder may perform a discrete cosine transform using transform coefficient values based on spatial frequency.
[0066] Although described herein with reference to matrix or Cartesian representation of the video frame 600 for clarity, the video frame 600 may be stored, transmitted, processed, or a combination thereof, in a data structure such that pixel values may be efficiently represented for the video frame 600. For example, the video frame 600 may be stored, transmitted, processed, or any combination thereof, in a two-dimensional data structure such as a matrix as shown, or in a one-dimensional data structure, such as a vector array. Furthermore, although described herein as showing a chrominance subsampled image where U and V have half the resolution of Y, the video frame 600 may have different configurations for the color channels thereof. For example, referring still to the YUV color space, full resolution may be used for all color channels of the video frame 600. In another example, a color space other than the YUV color space may be used to represent the resolution of color channels of the video frame 600.
[0067] FIG. 7 is a block diagram of an example of motion field storage for video coding. In particular, motion field storage for video coding uses a current reference frame 700 and one or more other reference frames 702 as input and processes the input at a motion vector identification stage 704, a motion vector direction determination stage 706, and a motion vector storage stage 708 to determine (e.g., generate or produce) a motion field 710 of (e.g., associated with) the current reference frame 700. For example, the stages 704, 706, and 708 may represent functionality of the intra / inter prediction stage 402 and / or the intra / inter prediction stage 508. The current reference frame 700 thus represents a first frame of a video sequence which is predicted using some or all of the other reference frames 702 and themotion field 710 of the current reference frame 700 may later be provided for use with a prediction of a second frame of the video sequence for which the first frame is thus a reference frame. For example, motion vectors of the motion field 710 which are loaded into memory may be used to predict one or more motion vectors to use for the prediction of a block of that second frame.
[0068] The motion vector identification stage 704 performs a linear projection against motion vectors of the other reference frames 702 to determine ones of those motion vectors that intersect the current reference frame 700. In particular, because the other reference frames 702 have already been processed, motion vectors thereof are accessible within a buffer. The motion vector identification stage 704 accesses the buffer to obtain the motion vector candidates (i.e., some or all of the motion vectors of the other reference frames 702) and then performs the linear projection to identify one or more motion vectors for one or more portions (e.g., blocks) of the current reference frame 700. For example, where the current reference frame 700 is entirely predicted using inter-prediction, one or more motion vectors are identified for each portion of the current reference frame 700. However, where some portions of the current reference frame 700 are predicted using intra-prediction, only the other portions (i.e., those predicted using inter-prediction) will have one or more motion vectors identified therefor.
[0069] The motion vector direction determination stage 706 determines, for each motion vector identified for a given portion (e.g., block) of the current reference frame 700, a direction of that motion vector. In particular, the motion vector direction determination stage 706 determines each such motion vector as being either a forward motion vector, meaning it points to a forward reference frame of the current reference frame 700, or a backward motion vector, meaning it points to a backward reference frame of the current reference frame 700. To determine the direction of a given motion vector, the motion vector direction determination stage 706 takes as input a reference frame index of the current reference frame 700 and a reference frame index of one of the other reference frames 702 to which the motion vector points. Where the reference frame index of the one of the other reference frames 702 is greater than the reference frame index of the current reference frame 700, the one of the other reference frames 702 is identified as a forward (i.e., future) reference frame for the current reference frame and the motion vector is accordingly determined to be a forward motion vector. Where the reference frame index of the one of the other reference frames 702 is less than the reference frame index of the current reference frame 700, the one of the other reference frames 702 is identified as a backward (i.e., past) reference frame for the currentreference frame and the motion vector is accordingly determined to be a backward motion vector.
[0070] The motion vector storage stage 708 stores, for each portion (e.g., block) of the current reference frame 700, the one or more motion vectors associated with that portion in an order according to the determined directions of those one or more motion vectors. In particular, the one or more motion vectors are stored within slots of the motion field 710 of the current reference frame 700. Each portion of the motion field 710 corresponds to a colocated portion of the current reference frame 700. As such, a given portion of the current reference frame 700 that has associated therewith one or more motion vectors will have those one or more motion vectors stored therein. The one or more motion vectors for a given portion of the motion field 710 are stored in slots. In one particular example, each portion of the motion field 710 may have two slots each capable of storing a motion vector (e.g., in a data format including information describing a reference frame from which the motion vector points and a location within that reference frame where the motion vector points). A first slot of the two slots may be considered a default slot for backward motion vectors and a second slot of the two slots may be considered a default slot for forward motion vectors. In some cases, this may be reversed.
[0071] Where there are two motion vectors identified for a given portion of the current reference frame 700 and they each point in a different direction (i.e., one is a backward motion vector and the other is a forward motion vector), they are each stored in their default slots within a portion of the motion field 710 that corresponds to the portion of the current reference frame 700. For example, where the current reference frame 700 is reference frame index 7 and the two motion vectors include a first motion vector that points to a backward reference frame (e.g., reference frame index 0) and a second motion vector that points to a forward reference frame (e.g., reference frame index 16), the first motion vector is stored in the first slot and the second motion vector is stored in the second slot.
[0072] Where there are two motion vectors identified for a given portion of the current reference frame 700 and they each point in a same direction (i.e., they are both backward motion vectors or forward motion vectors), the motion vector that points to a closer reference frame 702 relative to the current reference frame 700 in a display order of the video sequence is stored in the default slot for that direction within a portion of the motion field 710 that corresponds to the portion of the current reference frame 700 and the other motion vector is stored in the remaining slot of that portion of the motion field 710. For example, where the current reference frame 700 is reference frame index 7 and the two motion vectors include afirst motion vector that points to a reference frame index 10 and a second motion vector that points to a reference frame index 16, the first motion vector is stored in the second slot (i.e., the default slot for forward motion vectors) because both motion vectors are forward motion vectors and the reference frame index 10 is closer to the reference frame index 7 than the reference frame index 16.
[0073] Where there is only one valid motion vector identified for a given portion of the current reference frame 700, it is stored in both slots within a portion of the motion field 710 that corresponds to the portion of the current reference frame 700. A motion vector is valid where it can be used for inter-prediction of the current reference frame 700. In non-limiting examples, a motion vector may be invalid where it is too large or where the reference frame to which it points is not available within the reference frame buffer used for predicting the current reference frame 700. For example, where the current reference frame 700 is reference frame index 7 and two motion vectors are identified for a portion of the current reference frame 700, but one points to a reference frame which is not available (e.g., stored) within the reference frame buffer (e.g., because it was purged due to time or space requirements), only the other motion vector is valid and it is thus stored in both slots within the portion of the motion field 710 that corresponds to the portion of the current reference frame 700.
[0074] FIG. 8 is an illustration of an example of a grid of blocks 800 of a motion field. The grid of blocks 800 includes a number of blocks arranged in a two-dimensional grid. Each of the blocks includes one or more units of pixels, each of which is an MxN portion of the motion field co-located with a corresponding MxN portion of a reference frame with which the motion field is associated (e.g., the current reference frame 700), in which M and N are positive integers and may be the same or different. In the example shown, the blocks are indicated with bolded boundaries and the units of pixels are shown within respective ones of the blocks. For example, a block 802 is shown as including 16 units of pixels, a block 804 is shown as including 4 units of pixels, and each block in a region 806 is shown as including 1 unit of pixels.
[0075] For each unit of pixels, one or more motion vectors can be stored. In the example shown, two motion vectors can be stored for each unit of pixels in which a first motion vector is stored in a first slot of the unit of pixels and a second motion vector is stored in a second slot of the unit of pixels. Each slot includes information identifying the motion vector, such as based on a location within a reference frame at which the motion vector points. The location within the reference frame may, for example, refer to a block, unit of pixels, or other portion of that reference frame. The information stored within a slot identifies thecorresponding reference frame by frame index. Thus, as shown, each portion includes two slots in which each slot stores one motion vector, and, more particularly, in which each slot stores data indicative of a reference frame to which the motion vector points and a location within that reference frame at which the motion vector points.
[0076] Because a block is typically predicted together, the units of pixels associated with each block will generally all correspond to the same one or more motion vectors. For example, in each unit of pixels of the block 802, the same two motion vectors are stored - the first pointing to a location (1, 2) in reference frame index 0 and the second pointing to a location (-1, -2) in a reference frame index 16. Whether a stored motion vector is a backward motion vector or a forward motion vector depends on the display order relationship between the current reference frame and the reference frame to which the motion vector points. For example, assume that the grid of blocks 800 corresponds to a motion field for a reference frame index 7 as the current reference frame. In such a case, the motion vector stored in the first slot in each unit of pixels in the block 802 is a backward motion vector because it points to a past reference frame (i.e., reference frame index 0), while the motion vector stored in the second slot in each unit of pixels in the block 802 is a forward motion vector because it points to a future reference frame (i.e., reference frame index 16).
[0077] The storage of the motion vectors described in the grid of blocks 800 will now be described further assuming that the grid of blocks 800 corresponds to a motion field for a reference frame index 7 as the current reference frame. With the block 802, the two motion vectors used include a first motion vector pointing to the reference frame index 0 and a second motion vector pointing to the reference frame index 16. Accordingly, the motion vector is a backward motion vector and the second motion vector is a forward motion vector. Because these motion vectors are in different directions, the backward motion vector (i.e., the first motion vector) is stored in the first slot and the forward motion vector (i.e., the second motion vector) is stored in the second slot. With the block 804, a single motion vector pointing to the reference frame 16 is used and thus the inter-prediction of the block 804 is unidirectional (as opposed to that of the block 802 which instead is bidirectional). Because there is no second motion vector for the block 804, the second motion vector for the block 804 is considered to be invalid, and so the single valid motion vector is stored in both slots.
[0078] With the region 806, the upper-left-most block has a first motion vector that points to reference frame index 16 and a second motion vector that points to reference frame index 8. Both of these motion vectors are forward motion vectors and thus point in a same direction. Since the reference frame index 8 is closer to the current reference frame (i.e.,reference frame index 7) than the reference frame index 16, the second motion vector is stored in the default slot for forward motion vectors (i.e., the second slot) and the first motion vector is stored in the remaining slot (i.e., the first slot). The upper-right-most block of the region 806 again has a single motion vector pointing to the reference frame index 8, and so that motion vector, as the only valid motion vector for the block, is stored in both slots. Neither of the bottom blocks of the region 806 has any motion vectors (e.g., because they are intra-predicted), and so no motion vector is stored in either slot for either of those blocks.
[0079] Further details of techniques for directional storage of reference motion field motion vectors are now described. FIG. 9 is a flowchart diagram of an example of a technique 900 for directional storage of reference motion field motion vectors. FIG. 10 is a flowchart diagram of an example of a technique 1000 for performing inter-prediction by loading motion vectors from a motion field according to a prediction direction. The technique 900 and / or the technique 1000 may, for example, be wholly or partially performed at or otherwise in connection with a prediction stage of an encoder used to encode a video stream (e.g., the intra / inter prediction stage 402) or at or otherwise in connection with a prediction stage of a decoder used to decode a bitstream (e.g., the intra / inter prediction stage 508).
[0080] The technique 900 and / or the technique 1000 can be implemented, for example, as a software program that may be executed by computing devices such as the transmitting station 102 or the receiving station 106. For example, the software program can include machine-readable instructions that may be stored in a memory such as the memory 204 or the secondary storage 214, and that, when executed by a processor, such as the processor 202, may cause the computing device to perform the technique 900 and / or the technique 1000.The technique 900 and / or the technique 1000 can be implemented using specialized hardware or firmware. For example, a hardware component, such as a hardware coder, may be configured to perform the technique 900 and / or the technique 1000. As explained above, some computing devices may have multiple memories or processors, and the operations described in the technique 900 and / or the technique 1000 can be distributed using multiple processors, memories, or both.
[0081] For simplicity of explanation, the technique 900 and the technique 1000 are each depicted and described herein 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 technique in accordance with the disclosed subject matter.
[0082] Referring first to FIG. 9, the technique 900 for directional storage of reference motion field motion vectors is shown. At 902, one or more motion vectors associated with a portion of a first frame of a video sequence are identified. The portion of the first frame may, for example, correspond to one or more blocks of the first frame. Identifying the one or more motion vectors includes linearly projecting motion vectors of one or more reference frames of the first frame through the first frame to identify points within the first frame at which those linearly projected motion vectors intersect the first frame. This linear projection may be performed during encoding only or during both encoding and decoding. For example, the one or more motion vectors may be signaled within a bitstream to which the video sequence is encoded in connection with an encoding of the video sequence and the one or more motion vectors may be determined based on (e.g., decoded or derived from) the bitstream in connection with a decoding of a bitstream to which the video sequence is encoded.
[0083] At 904, for each of the one or more motion vectors identified for the portion of the first frame, a direction of the motion vector is determined. Determining the direction of an identified motion vector includes determining whether the reference frame to which the motion vector points is a forward reference frame or a backward reference frame according to a relative order of the first frame and the reference frame in a display order of the video sequence. Thus, determining the direction of a motion vector includes determining the direction as one of a backward direction or a forward direction based on whether a reference frame to which the motion vector points is a backward reference frame or a forward reference frame.
[0084] At 906, the one or more motion vectors are stored within a portion of a motion field associated with the first frame in an order according to the directions determined for the one or more motion vectors. The portion of the motion field corresponds to the portion of the first frame. For example, where the portion of the first frame corresponds to a block of pixels of the first frame, the portion of the motion field may be co-located with the block of pixels. The portion of the motion field is described herein as being one unit of pixels. However, in some cases, the portion of the motion field may be another portion of the motion field, for example, some but not all units of pixels within a single block of a grid of blocks of the motion field, all units of pixels within a single block of the grid of blocks of the motion field, or some or all units of pixels associated with each of multiple blocks of the grid of blocks of the motion field.
[0085] Where the one or more motion vectors include a first motion vector determined to have a backward direction and a second motion vector determined to have a forwarddirection, storing the one or more motion vectors in the order according to the directions of the one or more motion vectors includes storing the first motion vector within a first slot associated with the portion of the motion field and storing the second motion vector within a second slot associated with the portion of the motion field. Where the one or more motion vectors include a first motion vector and a second motion vector both determined to have a same direction, storing the one or more motion vectors in the order according to the directions of the one or more motion vectors includes determining that a first reference frame to which the first motion vector points is closer to the first frame in the video sequence than a second reference frame to which the second motion vector points, and, based on the determination that the first reference frame is closer to the first frame than the second reference frame, storing the first motion vector within a default slot associated with the portion of the motion field and storing the second motion vector within a remaining slot associated with the portion of the motion field. For example, the default slot is a first slot where the same direction is a backward direction. In another example, the default slot is a second slot wherein the same direction is a forward direction. Where the one or more motion vectors include only one valid motion vector, storing the one or more motion vectors in the order according to the directions of the one or more motion vectors includes storing the one valid motion vector in both of a first slot and a second slot associated with the portion of the motion field. In some cases, there may be more than two slots in which motion vectors may be stored.
[0086] At 908, the motion field including the stored one or more motion vectors is provided for use with an inter-prediction of a second frame of the video sequence. For example, the first frame may be a reference frame of the second frame and the motion field of the first frame may thus be used for motion compensated prediction of some or all of the second frame. For example, use of the motion field of the first frame for motion compensated prediction of some or all of the second frame can include using motion vectors of the motion field that are loaded into memory to predict one or more motion vectors for predicting one or more blocks of the second frame. Implementations and examples of use of a motion field for the inter-prediction of a frame are described below with respect to FIG. 10.
[0087] Referring next to FIG. 10, the technique 1000 for performing inter-prediction by loading motion vectors from a motion field according to a prediction direction is shown. At 1002, a motion field associated with a reference frame of a current frame is obtained. For example, obtaining the motion field may include obtaining the motion field or motion vectors thereof from a buffer or other memory location. In another example, obtaining the motionfield may include determining the motion field. Implementations and examples of determining a motion field are described above with respect to FIG. 9.
[0088] At 1004, a direction for prediction of a current block of the current frame is determined. For example, during encoding, a motion search process can be performed to determine the direction of prediction of the current block. In another example, during decoding, one or more syntax elements signaled within the bitstream to which the video sequence is encoded may be used to determine the direction of prediction of the current block.
[0089] At 1006, one or more motion vectors of the motion field which correspond to the direction for prediction of the current block are loaded into memory. For example, where the one or more motion vectors associated with a portion of the motion field that corresponds to the current block point in different directions, only the motion vector that points in the direction for prediction of the current block is loaded into memory.
[0090] At 1008, an inter-prediction is performed against the current block using the one or more motion vectors loaded into memory. In particular, the one or more motion vectors loaded into memory are used to predict a motion vector for the current block, and the predicted motion vector is then used directly within an inter-prediction of the current block. The prediction thus is limited to those motion vectors loaded into memory. Other motion vectors of the motion field not loaded into memory are thus not used for the inter-prediction. During encoding, the applicable motion vectors loaded into memory from the motion field are used to predict a motion vector for the current block to encode. Thereafter, the interprediction is performed against the current block using the predicted motion vector to result in a prediction residual which may then be transformed, quantized, and entropy coded to prepare same for signaling within a bitstream A motion vector residual representing a difference between a motion vector identified for the current block via a motion search and the predicted motion vector may be signaled within the bitstream, as well. During decoding, the applicable motion vectors loaded into memory from the motion field are used to predict a motion vector for the current block to decode. A motion vector residual signaled for the current block may be processed with a motion vector loaded into memory to result in a predicted motion vector. Thereafter, the inter-prediction is performed against a prediction residual of the current block using the predicted motion vector. The result of the interprediction is a prediction block which may be processed with a prediction residual signaled within the bitstream to reconstruct the current block. Thus, references above to the current block may correspond to bitstream data associated with the current block rather than thecurrent block in a pre-encoded state or the reconstructed block in a post-prediction state. In some cases, a motion vector residual may not be signaled within the bitstream, for example, where the predicted motion vector equals or is within a threshold of a motion vector identified for the current block via an encoder- side motion search.
[0091] The implementations of this disclosure describe methods, systems, devices, apparatuses, and non-transitory computer readable media for directional storage of reference motion field motion vectors.
[0092] In some implementations, a method comprises: identifying one or more motion vectors associated with a portion of a first frame of a video sequence; determining, for each of the one or more motion vectors, a direction of the motion vector; storing, within a portion of a motion field associated with the first frame, the one or more motion vectors in an order according to the directions of the one or more motion vectors; and providing the motion field including the stored one or more motion vectors for use with an inter-prediction of a second frame of the video sequence.
[0093] In some implementations of the method, the one or more motion vectors include a first motion vector determined to have a backward direction and a second motion vector determined to have a forward direction, and storing the one or more motion vectors in the order according to the directions of the one or more motion vectors comprises: storing the first motion vector within a first slot associated with the portion of the motion field; and storing the second motion vector within a second slot associated with the portion of the motion field.
[0094] In some implementations of the method, the one or more motion vectors include a first motion vector and a second motion vector both determined to have a same direction, and storing the one or more motion vectors in the order according to the directions of the one or more motion vectors comprises: determining that a first reference frame to which the first motion vector points is closer to the first frame in the video sequence than a second reference frame to which the second motion vector points; and based on the determination that the first reference frame is closer to the first frame than the second reference frame: storing the first motion vector within a default slot associated with the portion of the motion field; and storing the second motion vector within a remaining slot associated with the portion of the motion field.
[0095] In some implementations of the method, the default slot is a first slot where the same direction is a backward direction.
[0096] In some implementations of the method, the default slot is a second slot whereinthe same direction is a forward direction.
[0097] In some implementations of the method, the one or more motion vectors include only one valid motion vector, and storing the one or more motion vectors in the order according to the directions of the one or more motion vectors comprises: storing the one valid motion vector in both of a first slot and a second slot associated with the portion of the motion field.
[0098] In some implementations of the method, determining the direction of a motion vector comprises: determining the direction as one of a backward direction or a forward direction based on whether a reference frame to which the motion vector points is a backward reference frame or a forward reference frame.
[0099] In some implementations of the method, the video sequence is represented as a bitstream and the one or more motion vectors are decoded from the bitstream.
[0100] In some implementations of the method, the method comprises: in connection with a decoding of a bitstream to which the video sequence is encoded, determining the one or more motion vectors based on the bitstream.
[0101] In some implementations of the method, the portion of the first frame corresponds to a block of pixels of the first frame and the portion of the motion field is co-located with the block of pixels.
[0102] In some implementations, an apparatus comprises a memory and a processor configured to execute instructions stored in the memory to: determine, for each of multiple motion vectors associated with a portion of a first frame of a video sequence, a direction of the motion vector; store, in an order according to the directions of the multiple motion vectors, each of the multiple motion vectors within a slot associated with a portion of a motion field of the first frame; and provide the motion field including the stored multiple motion vectors for use with an inter-prediction of a second frame of the video sequence.
[0103] In some implementations of the apparatus, the multiple motion vectors include a first motion vector determined to have a backward direction and a second motion vector determined to have a forward direction, and, to store each of the multiple motion vectors within a slot associated with the portion of the motion field, the processor is configured to execute the instructions to: store the first motion vector within a first slot; and store the second motion vector within a second slot.
[0104] In some implementations of the apparatus, the multiple motion vectors include a first motion vector and a second motion vector both determined to have a same direction, and, to store each of the multiple motion vectors within a slot associated with the portion ofthe motion field, the processor is configured to execute the instructions to: store, based on a first reference frame to which the first motion vector points being closer to the first frame in the video sequence than a second reference frame to which the second motion vector points, the first motion vector within a default slot; and store, based on the first reference frame being closer to the first frame than the second reference frame, the second motion vector within a remaining slot.
[0105] In some implementations of the apparatus, the default slot is a first slot of two slots where the same direction is a backward direction or a second slot of the two slots where the same direction is a forward direction.
[0106] In some implementations of the apparatus, the multiple motion vectors include only one valid motion vector and the one valid motion vector is stored within multiple slots associated with the portion of the motion field.
[0107] In some implementations of the apparatus, the direction of a motion vector of the multiple motion vectors is determined as a backward direction where the motion vector points to a backward reference frame of the first frame or as a forward direction where the motion vector points to a forward reference frame of the first frame.
[0108] In some implementations, a non-transitory computer readable storage medium has stored thereon instructions that, when executed, cause a processor to: store, within a first slot associated with a portion of a motion field of a first frame of a video sequence, a first motion vector according to a direction of the first motion vector; store, within a second slot associated with the portion of the motion field, a second motion vector according to a direction of the second motion vector; and provide the motion field including the stored first and second motion vectors for use with an inter-prediction of a second frame of the video sequence.
[0109] In some implementations of the non-transitory computer readable storage medium, the direction of the first motion vector is different than the direction of the second motion vector.
[0110] In some implementations of the non-transitory computer readable storage medium, the direction of the first motion vector is the same as the direction of the second motion vector.
[0111] In some implementations of the non-transitory computer readable storage medium, the first motion vector is a valid motion vector and the second motion vector is the first motion vector.
[0112] The aspects of encoding and decoding described above illustrate some examplesof 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.
[0113] 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 being 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 clearly indicated otherwise by the context, the statement “X includes A or B” is intended to mean any of the natural inclusive permutations thereof. 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 clearly indicated by the context to be directed to a singular form. Moreover, use of the term “an implementation” or the term “one implementation” throughout this disclosure is not intended to mean the same implementation unless described as such.
[0114] Implementations of the transmitting station 102 and / or the receiving station 106 (and the algorithms, methods, instructions, etc., stored thereon and / or executed thereby, including by the encoder 400 and the decoder 500, or another encoder or decoder as disclosed herein) 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 102 and the receiving station 106 do not necessarily have to be implemented in the same manner.
[0115] Further, in one aspect, for example, the transmitting station 102 or the receiving station 106 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- l-hardware for carrying out any of the methods, algorithms, or instructions described herein.
[0116] The transmitting station 102 and the receiving station 106 can, for example, be implemented on computers in a video conferencing system. Alternatively, the transmitting station 102 can be implemented on a server, and the receiving station 106 can be implemented on a device separate from the server, such as a handheld communications device. In this instance, the transmitting station 102 can encode content 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. Alternatively, the communications device can decode content stored locally on the communications device, for example, content that was not transmitted by the transmitting station 102. Other suitable transmitting and receiving implementation schemes are available. For example, the receiving station 106 can be a generally stationary personal computer rather than a portable communications device.
[0117] Further, all or a portion of implementations of this 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 semiconductor device. Other suitable mediums are also available.
[0118] The above-described implementations and other aspects have been described to facilitate easy understanding of this disclosure and do not limit this disclosure. On the contrary, this disclosure is intended to cover various modifications and equivalent arrangements included within the scope of the appended claims, which scope is to be accorded the broadest interpretation as is permitted under the law to encompass all such modifications and equivalent arrangements.
Claims
What is claimed is:
1. A method, comprising: identifying one or more motion vectors associated with a portion of a first frame of a video sequence; determining, for each of the one or more motion vectors, a direction of the motion vector; storing, within a portion of a motion field associated with the first frame, the one or more motion vectors in an order according to the directions of the one or more motion vectors; and providing the motion field including the stored one or more motion vectors for use with an inter-prediction of a second frame of the video sequence.
2. The method of claim 1, wherein the one or more motion vectors include a first motion vector determined to have a backward direction and a second motion vector determined to have a forward direction, and wherein storing the one or more motion vectors in the order according to the directions of the one or more motion vectors comprises: storing the first motion vector within a first slot associated with the portion of the motion field; and storing the second motion vector within a second slot associated with the portion of the motion field.
3. The method of claim 1, wherein the one or more motion vectors include a first motion vector and a second motion vector both determined to have a same direction, and wherein storing the one or more motion vectors in the order according to the directions of the one or more motion vectors comprises: determining that a first reference frame to which the first motion vector points is closer to the first frame in the video sequence than a second reference frame to which the second motion vector points; and based on the determination that the first reference frame is closer to the first frame than the second reference frame: storing the first motion vector within a default slot associated with the portion of the motion field; and storing the second motion vector within a remaining slot associated with theportion of the motion field.
4. The method of claim 3, wherein the default slot is a first slot where the same direction is a backward direction.
5. The method of claim 3, wherein the default slot is a second slot wherein the same direction is a forward direction.
6. The method of any one of claims 1 through 5, wherein the one or more motion vectors include only one valid motion vector, and wherein storing the one or more motion vectors in the order according to the directions of the one or more motion vectors comprises: storing the one valid motion vector in both of a first slot and a second slot associated with the portion of the motion field.
7. The method of any one of claims 1 through 5, wherein determining the direction of a motion vector comprises: determining the direction as one of a backward direction or a forward direction based on whether a reference frame to which the motion vector points is a backward reference frame or a forward reference frame.
8. The method of any one of claims 1 through 5, comprising: in connection with an encoding of the video sequence, signaling the one or more motion vectors within a bitstream to which the video sequence is encoded.
9. The method of any one of claims 1 through 5, wherein the video sequence is represented as a bitstream and the one or more motion vectors are decoded from the bitstream.
10. The method of any one of claims 1 through 5, wherein the portion of the first frame corresponds to a block of pixels of the first frame and the portion of the motion field is co-located with the block of pixels.
11. An apparatus, comprising: a memory; anda processor configured to execute instructions stored in the memory to: determine, for each of multiple motion vectors associated with a portion of a first frame of a video sequence, a direction of the motion vector; store, in an order according to the directions of the multiple motion vectors, each of the multiple motion vectors within a slot associated with a portion of a motion field of the first frame; and provide the motion field including the stored multiple motion vectors for use with an inter-prediction of a second frame of the video sequence.
12. The apparatus of claim 11, wherein the multiple motion vectors include a first motion vector determined to have a backward direction and a second motion vector determined to have a forward direction, and wherein, to store each of the multiple motion vectors within a slot associated with the portion of the motion field, the processor is configured to execute the instructions to: store the first motion vector within a first slot; and store the second motion vector within a second slot.
13. The apparatus of claim 11, wherein the multiple motion vectors include a first motion vector and a second motion vector both determined to have a same direction, and wherein, to store each of the multiple motion vectors within a slot associated with the portion of the motion field, the processor is configured to execute the instructions to: store, based on a first reference frame to which the first motion vector points being closer to the first frame in the video sequence than a second reference frame to which the second motion vector points, the first motion vector within a default slot; and store, based on the first reference frame being closer to the first frame than the second reference frame, the second motion vector within a remaining slot.
14. The apparatus of claim 13, wherein the default slot is a first slot of two slots where the same direction is a backward direction or a second slot of the two slots where the same direction is a forward direction.
15. The apparatus of claim 11, wherein the multiple motion vectors include only one valid motion vector and the one valid motion vector is stored within multiple slots associated with the portion of the motion field.
16. The apparatus of any one of claims 11 through 15, wherein the direction of a motion vector of the multiple motion vectors is determined as a backward direction where the motion vector points to a backward reference frame of the first frame or as a forward direction where the motion vector points to a forward reference frame of the first frame.
17. A non-transitory computer readable storage medium having stored thereon instructions that, when executed, cause a processor to: store, within a first slot associated with a portion of a motion field of a first frame of a video sequence, a first motion vector according to a direction of the first motion vector; store, within a second slot associated with the portion of the motion field, a second motion vector according to a direction of the second motion vector; and provide the motion field including the stored first and second motion vectors for use with an inter-prediction of a second frame of the video sequence.
18. The non-transitory computer readable storage medium of claim 17, wherein the direction of the first motion vector is different than the direction of the second motion vector.
19. The non-transitory computer readable storage medium of claim 17, wherein the direction of the first motion vector is a same as the direction of the second motion vector.
20. The non-transitory computer readable storage medium of any one of claims 17 through 19, wherein the first motion vector is a valid motion vector, and the second motion vector is the first motion vector.
Citation Information
Patent Citations
Video encoding and decoding
US20230127212A1
Motion vector coding method and motion vector decoding method
US7394853B2
Motion vector prediction in bi-directionally predicted interlaced field-coded pictures
US7852936B2