The machine, the non-temporary computer-readable means, and the method for selecting reference frames and signaling to initialize frame context in video encoding.
Patent Information
- Authority / Receiving Office
- VN · VN
- Patent Type
- Applications
- Current Assignee / Owner
- GOOGLE LLC
- Filing Date
- 2024-10-17
- Publication Date
- 2026-07-01
AI Technical Summary
Existing video coding techniques face challenges in efficiently selecting and initializing frame contexts for current frames, leading to suboptimal data compression and increased computational resources.
The proposed system and method involve an apparatus and method for reference frame selection and signaling, which determine whether the primary reference frame is optimal for a current frame. Based on this determination, the system either initializes frame contexts using the primary reference frame or switches to an optimal reference frame signaled within the bitstream, ensuring optimal frame context initialization for entropy coding.
This approach enables flexible and efficient selection of frame contexts, reducing the coded frame size and improving computational efficiency by aligning frame contexts with the most suitable reference frames, thereby enhancing video coding performance.
Smart Images

Figure VN1202603073_0
Abstract
Description
REFERENCE FRAME SELECTION AND SIGNALING FOR FRAME CONTEXTINITIALIZATION IN VIDEO CODINGBACKGROUND
[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 reference frame selection and signaling for frame context initialization in video coding.
[0003] According to an implementation of this disclosure, an apparatus for reference frame selection and signaling for frame context initialization comprises: a memory; and a processor configured to execute instructions stored in the memory to: determine a list of reference frames available for predicting a current frame to decode from an encoded bitstream; determine, based on a first symbol signaled within the encoded bitstream, whether a primary reference frame of the current frame is an optimal reference frame of the current frame; responsive to a determination that the primary reference frame is the optimal reference frame: determine the primary reference frame from amongst the list of reference frames based on a similarity metric comparing reference frames of the list of reference frames against the current frame; and initialize frame contexts of the current frame according to frame contexts of the primary reference frame; responsive to a determination that the primary reference frame is other than the optimal reference frame: determine the optimal reference frame based on a second symbol signaled within the encoded bitstream; and initialize the frame contexts of the current frame according to frame contexts of the optimal reference frame; and entropy code the current frame using the initialized frame contexts to produce entropy decoded data usable to reconstruct the current frame.
[0004] In some implementations of the apparatus, the first symbol is a binary symbol indicating a first value where the primary reference frame is the optimal reference frame or a second value where the primary reference frame is other than the optimal reference frame.
[0005] In some implementations of the apparatus, to determine the primary reference frame, the processor is configured to execute the instructions to: determine a first value for the similarity metric based on the current frame; determine a second value for the similarity metric based on each reference frame of the list of reference frames; and determine, as the primary reference frame, a reference frame of the list of reference frames associated with the second value that is closest to the first value.
[0006] In some implementations of the apparatus, the similarity metric corresponds to quantizer parameters and the primary reference frame is determined as the reference frame of the list of reference frames associated with the second value representing a smallest absolute quantizer parameter difference.
[0007] In some implementations of the apparatus, the similarity metric corresponds to block prediction modes and the primary reference frame is determined as the reference frame of the list of reference frames associated with the second value representing percentages of blocks predicted using intra prediction and using inter prediction that are closest to percentages of blocks predicted using intra prediction and using inter prediction of the current frame.
[0008] In some implementations of the apparatus, to determine the reference frame associated with the second value that is closest to the first value, the processor is configured to execute the instructions to: determine that multiple reference frames of the list of reference frames are associated with the second value that is closest to the first value; and responsive to the determination that the multiple reference frames are associated with the second value that is closest to the first value, determine, as the primary reference frame, a reference frame of the multiple reference frames that is most recently decoded.
[0009] According to an implementation of this disclosure, a non-transitory computer readable medium has stored thereon an encoded bitstream, wherein the encoded bitstream is configured for decoding by operations for reference frame selection and signaling for frame context initialization, the operations comprising: determining whether a primary reference frame of a current frame to decode is an optimal reference frame of the current frame; responsive to a determination that the primary reference frame is the optimal reference frame, initializing frame contexts of the current frame according to frame contexts of the primary reference frame; responsive to a determination that the primary reference frame is other thanthe optimal reference frame, initializing the frame contexts of the current frame according to frame contexts of the optimal reference frame; and entropy coding the current frame using the initialized frame contexts to produce entropy decoded data usable to reconstruct the current frame.
[0010] In some implementations of the non-transitory computer readable medium, the operations comprise: determining a list of reference frames available for predicting the current frame based on a frame header of the current frame within the encoded bitstream, wherein the frame header includes a first symbol used to determine whether the primary reference frame is the optimal reference frame, and wherein, where the primary reference frame is other than the optimal reference frame, the frame header includes a second symbol used to determine the optimal reference frame.
[0011] In some implementations of the non-transitory computer readable medium, initializing the frame contexts of the current frame according to the frame contexts of the primary reference frame comprises: determining, based on the first symbol indicating that the primary reference frame is the optimal reference frame, the primary reference frame from amongst the list of reference frames based on a similarity metric comparing reference frames of the list of reference frames against the current frame.
[0012] In some implementations of the non-transitory computer readable medium, determining the primary reference frame from amongst the list of reference frames based on the similarity metric comprises: determining a first value for the similarity metric based on the current frame; determining a second value for the similarity metric based on each reference frame of the list of reference frames; and determining, as the primary reference frame, a reference frame of the list of reference frames associated with the second value that is closest to the first value.
[0013] In some implementations of the non-transitory computer readable medium, the similarity metric corresponds to one or more of quantizer parameters or block prediction modes.
[0014] In some implementations of the non-transitory computer readable medium, initializing the frame contexts of the current frame according to the frame contexts of the optimal reference frame comprises: determining, based on the first symbol indicating that the primary reference frame is other than the optimal reference frame, the optimal reference frame using a reference frame list index indicated by the second symbol.
[0015] In some implementations of the non-transitory computer readable medium, the operations comprise: determining whether the primary reference frame is the optimal reference frame.
[0016] According to an implementation of this disclosure, a method for reference frame selection and signaling for frame context initialization comprises: selecting, as a reference frame from amongst a list of reference frames available for predicting a current frame to decode, one of a primary reference frame of the current frame or an optimal reference frame of the current frame; initializing frame contexts of the current frame according to frame contexts of the selected reference frame; and entropy coding the current frame using the initialized frame contexts to produce entropy decoded data usable to reconstruct the current frame.
[0017] In some implementations of the method, the method comprises: determining, based on a first symbol signaled within an encoded bitstream to which the current frame is encoded, whether the primary reference frame is the optimal reference frame.
[0018] In some implementations of the method, selecting the one of the primary reference frame or the optimal reference frame comprises one of: selecting the primary reference frame responsive to a determination, based on the first symbol, that the primary reference frame is the optimal reference frame; or selecting the optimal reference frame responsive to a determination, based on the first symbol, that the primary reference frame is other than the optimal reference frame.
[0019] In some implementations of the method, the primary reference frame is selected as the reference frame and the method comprises: determining the primary reference frame from amongst the list of reference frames based on a similarity metric comparing reference frames of the list of reference frames against the current frame.
[0020] In some implementations of the method, determining the primary reference frame from amongst the list of reference frames based on the similarity metric comprises: determining a first value for the similarity metric based on the current frame; determining a second value for the similarity metric based on each reference frame of the list of reference frames; and determining, as the primary reference frame, a reference frame of the list of reference frames associated with the second value that is closest to the first value.
[0021] In some implementations of the method, the optimal reference frame is selected as the reference frame and the method comprises: determining, based on a second symbol signaled within the encoded bitstream, the optimal reference frame from amongst the list of reference frames based on an index indicated by the second symbol.
[0022] In some implementations of the method, the method comprises: determining the list of reference frames based on a frame header associated with the current frame.
[0023] 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
[0024] The description herein makes reference to the accompanying drawings described below, wherein like reference numerals refer to like parts throughout the several views.
[0025] FIG. 1 is a schematic of an example of a video encoding and decoding system.
[0026] FIG. 2 is a block diagram of an example of a computing device that can implement a transmitting station or a receiving station.
[0027] FIG. 3 is a diagram of an example of a video stream to be encoded and decoded.
[0028] FIG. 4 is a block diagram of an example of an encoder.
[0029] FIG. 5 is a block diagram of an example of a decoder.
[0030] FIG. 6 is an illustration of examples of portions of a video frame.
[0031] FIG. 7 is a flowchart diagram of an example of a technique for reference frame selection and signaling for frame context initialization during encoding.
[0032] FIG. 8 is a flowchart diagram of an example of a technique for reference frame selection and signaling for frame context initialization during decoding.DETAILED DESCRIPTION
[0033] Video compression schemes may include breaking respective images, or frames, into smaller portions, such as blocks, and generating an output bitstream using techniques to limit the information included for respective blocks in the output. An encoded bitstream can be decoded to re-create the source images from the limited information. Typical video compression and decompression techniques use entropy coding to further reduce the number bits required to encode video data to or decode video data from a bitstream. For example, entropy coding may include using probability models reflecting the probability distributions of symbol values to encode to a bitstream, such as to reduce the amount of data that needs to be encoded.
[0034] Conventional entropy coding approaches use probability models which indicate contexts for different types of video data to encode or decode. In particular, the contexts for a given frame, referred to as frame contexts, are assigned probability values which reflect the likelihood that a particular symbol (e.g., a quantized transform coefficient of a transformblock or related information, such as motion or mode information) will have a particular value (e.g., 0 or 1 for binary cases or other values for non-binary cases). The probability values of a probability model may be updated during encoding or decoding, such as based on observations of the symbol values to encode or decode. The probabilities are important to entropy coding because they are used to determine the number of bits required to code the symbols. For example, symbol values that are more probable may be coded using fewer bits, whereas values that are less probable may be coded using more bits.
[0035] Entropy coding a current frame to encode to or decode from a bitstream typically includes initializing the frame contexts for the current frame by choosing initial probability values based on the prediction type of the current frame. In particular, where the current frame is an intra-predicted frame, and thus does not use a reference frame for its prediction, the initial frame contexts for the current frame may be adopted from a default probability table stored for use with the codec. In such a case, the entropy coding process for the current frame may begin using the probability table values as the initial values of the frame contexts. However, where the current frame is an inter-predicted frame, the frame contexts of the reference frame used to predict the current frame are adopted as the initial frame contexts for the current frame. In such a case, the entropy coding process for the current frame may begin using the frame contexts determined as output of the entropy coding process performed against the reference frame. While this approach enables certain spatial and temporal relationships between a current frame and its reference frame to be leveraged, its rigidity limits the potential for further improvement. That is, various similarities related to the coding process and which remain unexploited may lead to a more effective selection of frame contexts.
[0036] Implementations of this disclosure address problems such as these using reference frame selection and signaling for frame context initialization in video coding. Reference frame selection and signaling schemes of this disclosure enable a flexible approach to selecting and signaling the frame contexts for a current frame by enabling an encoder or a decoder to select the initialized frame contexts for a current frame based on the frame contexts of any of multiple reference frames available for the current frame. In particular, a reference frame may be selected from a list of reference frames available for encoding or decoding a current frame based on a similarity metric comparing the reference frames against the current frame. The selected reference frame may be referred to as a primary reference frame. The frame contexts for that current frame may then be initialized based on the frame contexts of the primary reference frame.
[0037] In some cases, the encoder may perform a two-pass process by which the primary reference frame is determined as described above as output of the first pass and an optimal reference frame is determined as output of the second pass. The optimal reference frame is a reference frame having frame contexts that, when used to entropy code the current frame, result in a smallest coded frame size for the current frame. Where this two-pass approach is used, a symbol may be signaled within the bitstream in connection with the current frame to indicate to a decoder whether the primary reference frame and the optimal reference frame are the same. In the event the primary reference frame and the optimal reference frame are the same, no further signaling is needed; otherwise, in the event the primary reference frame and the optimal reference frame are different, the optimal reference frame is signaled within the bitstream.
[0038] Because the decoder can perform the same process as the encoder to determine a primary reference frame for a current frame, the decoder can use this symbol to determine whether the primary reference frame is the same one from which frame contexts were selected for entropy coding the current frame during encoding. Where the primary reference frame and the optimal reference frame are the same, the decoder directly uses the primary reference frame it determines in the same manner as done by the encoder; however, where the primary reference frame and the optimal reference frame are different, the decoder reads the optimal reference frame from the bitstream and uses the optimal reference frame instead.
[0039] While reference is made herein by example to blocks and the like, as are commonly used in video codecs such as VP9, AVI, and the currently in-development 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 coding tree units (CTUs), coding units (CUs), prediction units (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 blocks and the like shall be regarded as expressions of nonlimiting example video coding structures with which the implementations of this disclosure may be used.
[0040] Further details of techniques for encoding or decoding using reference frame selection and signaling for frame context initialization 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 describedin 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.
[0041] 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 (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 102 to, in this example, the receiving station 106.
[0042] 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.
[0043] 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 video streaming protocol based on the Hypertext Transfer Protocol (HTTP).
[0044] 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.
[0045] 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 mayinclude 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.
[0046] 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.
[0047] 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, and the like.
[0048] 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.
[0049] 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, encoding or decoding as described herein.
[0050] 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 neededfor processing.
[0051] 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.
[0052] 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 user operating 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.
[0053] 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.
[0054] 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.
[0055] 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 cancomprise 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.
[0056] 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.
[0057] 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 two chrominance planes. The segments 308 may be sampled at different resolutions.
[0058] 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, NxM pixels in the frame 306, in which N and M may refer to the same integer value or to different 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 NxM pixels size.
[0059] 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.
[0060] 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) toreconstruct 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.
[0061] 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.
[0062] When the video stream 300 is presented for encoding after the pre-processing is performed, 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.
[0063] 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.
[0064] 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 encodedvideo bitstream, and the terms will be used interchangeably herein.
[0065] 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).
[0066] 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 filters which may be applied at the loop filtering stage 416 include, without limitation, a deblocking filter, a directional enhancement filter, and a loop restoration filter.
[0067] 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.
[0068] 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.
[0069] 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.
[0070] 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).
[0071] 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 be applied 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.
[0072] 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.
[0073] 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 950. Each 4x4 block 950 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.
[0074] The pixels may include information representing an image captured in the videoframe 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.
[0075] In some implementations, coding the video frame 600 may include ordered blocklevel 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.
[0076] 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 whereinthe 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.
[0077] 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 model may 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.
[0078] 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 configurationsfor 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.
[0079] Further details of techniques for encoding or decoding using reference frame selection and signaling for frame context initialization are now described. FIG. 7 is a flowchart diagram of an example of a technique 700 for reference frame selection and signaling for frame context initialization during encoding. FIG. 8 is a flowchart diagram of an example of a technique 800 for reference frame selection and signaling for frame context initialization during decoding. The technique 700 may, for example, be wholly or partially performed at an entropy coding stage of an encoder used to encode a video stream (e.g., the entropy coding stage 408), while the technique 800 may, for example, be wholly or partially performed at an entropy coding stage of a decoder used to decode a bitstream (e.g., the entropy coding stage 502).
[0080] The technique 700 and / or the technique 800 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 700 and / or the technique 800. The technique 700 and / or the technique 800 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 700 and / or the technique 800. As explained above, some computing devices may have multiple memories or processors, and the operations described in the technique 700 and / or the technique 800 can be distributed using multiple processors, memories, or both. For simplicity of explanation, the technique 700 and the technique 800 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.
[0081] Referring first to FIG. 7, the technique 700 for reference frame selection and signaling for frame context initialization during encoding is shown. At 702, a list of reference frames available for predicting a current frame to encode is determined. The list of referenceframes includes multiple reference frames which were evaluated by a prediction stage of the encoder (e.g., the intra / inter prediction stage 402) when determining the prediction for blocks of the current frame. Thus, the list of reference frames may include the one or more reference frames which were used to predict one or more blocks of the current frame as well as one or more other reference frames which were ultimately not used to predict one or more blocks of the current frame. Determining the list of reference frames includes obtaining and storing the frame contexts and frame data (e.g., motion vector data, pixel data, etc.) of each reference frame of the list for later use with the technique 700.
[0082] At 704, a primary reference frame is determined for the current frame. The primary reference frame is determined from amongst the multiple reference frames of the list of reference frames. Determining the primary reference frame includes determining, from amongst the multiple reference frames, the primary reference frame based on a similarity metric comparing the reference frames against the current frame. The similarity metric refers to a measurable type of video frame data. Thus, determining the primary reference frame includes determining a first value for the similarity metric based on the current frame and second values for the similarity metric based on each reference frame of the list of reference frames.
[0083] The particular manner for comparing the first value with the second values to determine the primary reference frame is based on the similarity metric. For example, where the similarity metric refers to quantizer parameters, determining the primary reference frame includes determining differences between quantizer parameters for the current (i.e., as the first value) and quantizer parameters for each of the reference frames (i.e., as the second values). The reference frame associated with the quantizer parameters that result in the smallest absolute quantizer parameter difference is then determined as the primary reference frame. In another example, where the similarity metric refers to block prediction modes, determining the primary reference frame includes determining, for the current frame and for each reference frame, a first percentage of blocks which are predicted using intra prediction and a second percentage of blocks which are predicted using inter prediction. The reference frame with the first and second percentages that are closest (e.g., in absolute value) to those of the current frame is then determined as the primary reference frame.
[0084] In some implementations, the similarity metric may be multiple similarity metrics. For example, where a subset of the reference frames share a same second value, as described above, an additional similarity metric may be used to determine the primary reference frame from amongst the subset of the reference frames. In some such implementations, theadditional similarity metric may refer to a distance between each reference frame and the current frame in a display order of a video sequence that includes the current frame and the reference frames. For example, where multiple reference frames have the same quantizer parameters that, when compared to the quantizer parameters of the current frame, result in the same lowest quantizer parameter difference value, the one of those reference frames that is also the closest in the display order to the current frame is determined as the primary reference frame. In another example, where multiple reference frames have the same first and second prediction mode percentages that are equally close to those of the current frame, the one of those reference frames that is also the closest in the display order to the current frame is determined as the primary reference frame.
[0085] In some implementations, where multiple reference frames still have identical values for the similarity metric and the additional similarity metric, other similarity metrics may also be used until a single reference frame is determined as the primary reference frame. For example, where multiple reference frames are equally close to the current frame in the display order for the video sequence (and share the same quantizer parameters, prediction mode percentages, or other similarity metric values), the reference frame which was most recently coded is determined as the primary reference frame.
[0086] At 706, an optimal reference frame is determined for the current frame. The optimal reference frame is determined by performing a two-pass process for entropy coding the current frame using the reference frames of the list of reference frames to determine coded frame sizes and then determining the reference frame which corresponds to the frame contexts that resulted in the lowest coded frame size. In a first pass, the current frame is entropy coded using the frame contexts of each reference frame of the list of reference frames individually to produce entropy coded frame data as output corresponding to each reference frame. The output is measured in terms of the total size of the respective entropy coded frame data. In a second pass, the output with the lowest entropy coded frame data size is determined and the corresponding reference frame (i.e., the reference frame having the frame contexts which resulted in that lowest entropy coded frame data size) is determined as the optimal reference frame. In some cases, the optimal reference frame may be the primary reference frame. In other cases, the optimal reference frame may be different from the primary reference frame.
[0087] At 708, frame contexts of the current frame are initialized. The frame contexts are initialized with values according to the frame contexts of the primary reference frame or the optimal reference frame. In particular, where the optimal reference frame is the primaryreference frame, the frame contexts of the current frame are initialized according to the frame contexts of the primary reference frame; however, where the optimal reference frame is different from the primary reference frame, the frame contexts of the current frame are initialized according to the frame contexts of the optimal reference frame.
[0088] At 710, the current frame is entropy coded using the initialized frame contexts. The values of the initialized frame contexts are updated as the data of the current frame are entropy coded. The output of the entropy coding, a set of entropy coded data for the current frame, is then written to a bitstream.
[0089] At 712, a one-bit symbol is signaled within (i.e., written to) the bitstream to which the current frame is encoded to indicate whether the primary reference frame and the optimal reference frame are the same. For example, the symbol may be written with a 0 value signaled where the primary reference frame and the optimal reference frame are the same or with a 1 value signaled where the primary reference frame and the optimal reference frame are different. The symbol is signaled to indicate to a decoder that will decode the bitstream whether the frame contexts of the primary reference frame or a different reference frame were used during encoding to initialize the frame contexts of the current frame.
[0090] At 714, where the optimal reference frame is different from the primary reference frame (and thus where the symbol written at 712 indicates that the primary reference frame and the optimal reference frame are different), an indication of the optimal reference frame is signaled within (i.e., written to) the bitstream to which the current frame is encoded. For example, the list of reference frames may be arranged into an ordered list in which each index of the ordered list corresponds to a different one of the reference frames. The index of the reference frame determined as the optimal reference frame is then signaled using one or more bits.
[0091] Referring next to FIG. 8, the technique 800 for reference frame selection and signaling for frame context initialization during decoding is shown. At 802, a list of reference frames available for predicting a current frame to decode is determined. The list of reference frames may, for example, be indicated within a frame header of the current frame within a bitstream to which encoded data of the current frame is written during encoding. In such a case, the list of reference frames may be determined at an encoder and signaled to a decoder performing the technique 800 via the bitstream.
[0092] At 804, a determination is made as to whether the primary reference frame is the same as an optimal reference frame determined by an encoder that produced the bitstream. Determining whether the primary reference frame is the same as the optimal reference frameincludes reading a one-bit symbol from the bitstream. The symbol indicates one value (e.g., 0) where the primary reference frame is the same as the optimal reference frame and a different value (e.g., 1) where the primary reference frame is different from the optimal reference frame. The symbol is thus used by the decoder performing the technique 800 to determine whether to adapt frame contexts of a primary reference frame or of an optimal reference frame for use with entropy coding the current frame.
[0093] Where a determination is made at 804 that the primary reference frame is the same as the optimal reference frame, the technique 800 proceeds to 806, where a primary reference frame is determined for the current frame. The primary reference frame is a reference frame of the list of reference frames. The primary reference frame is determined from amongst the list of reference frames available for predicting the current frame based on one or more similarity metrics. For example, the primary reference frame may be determined during decoding in the same manner as described above with respect to the technique 700.
[0094] Where a determination is made at 804 that the primary reference frame is different than the optimal reference frame, the technique 800 proceeds to 808, where the optimal reference frame is determined based on an index signaled within the bitstream. The index signaled within the bitstream indicates the optimal reference frame from amongst the list of reference frames. For example, the index may be signaled in connection with the current frame (e.g., within the frame header thereof) and correspond to a position within an ordered list of the list of reference frames to indicate the reference frame of the list of reference frames to be used as the optimal reference frame.
[0095] At 810, frame contexts of the current frame are initialized. The frame contexts are initialized with values according to the frame contexts of the primary reference frame or the optimal reference frame. In particular, where the optimal reference frame is the primary reference frame, the frame contexts of the current frame are initialized according to the frame contexts of the primary reference frame; however, where the optimal reference frame is different from the primary reference frame, the frame contexts of the current frame are initialized according to the frame contexts of the optimal reference frame.
[0096] At 812, the current frame is entropy coded using the initialized frame contexts. The values of the initialized frame contexts are updated as the data of the current frame are entropy coded. The output of the entropy coding, a set of entropy decoded data for the current frame, is then further processed (e.g., via dequantization, inverse transformation, and prediction) to produce and output a reconstructed version of the current frame.
[0097] 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.
[0098] 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.
[0099] 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.
[0100] 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 otherhardware for carrying out any of the methods, algorithms, or instructions described herein.
[0101] 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.
[0102] 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.
[0103] 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. An apparatus for reference frame selection and signaling for frame context initialization, the apparatus comprising: a memory; and a processor configured to execute instructions stored in the memory to: determine a list of reference frames available for predicting a current frame to decode from an encoded bitstream; determine, based on a first symbol signaled within the encoded bitstream, whether a primary reference frame of the current frame is an optimal reference frame of the current frame; responsive to a determination that the primary reference frame is the optimal reference frame: determine the primary reference frame from amongst the list of reference frames based on a similarity metric comparing reference frames of the list of reference frames against the current frame; and initialize frame contexts of the current frame according to frame contexts of the primary reference frame; responsive to a determination that the primary reference frame is other than the optimal reference frame: determine the optimal reference frame based on a second symbol signaled within the encoded bitstream; and initialize the frame contexts of the current frame according to frame contexts of the optimal reference frame; and entropy code the current frame using the initialized frame contexts to produce entropy decoded data usable to reconstruct the current frame.
2. The apparatus of claim 1, wherein the first symbol is a binary symbol indicating a first value where the primary reference frame is the optimal reference frame or a second value where the primary reference frame is other than the optimal reference frame.
3. The apparatus of any one of claims 1 or 2, wherein, to determine the primary reference frame, the processor is configured to execute the instructions to: determine a first value for the similarity metric based on the current frame;determine a second value for the similarity metric based on each reference frame of the list of reference frames; and determine, as the primary reference frame, a reference frame of the list of reference frames associated with the second value that is closest to the first value.
4. The apparatus of claim 3, wherein the similarity metric corresponds to quantizer parameters and the primary reference frame is determined as the reference frame of the list of reference frames associated with the second value representing a smallest absolute quantizer parameter difference.
5. The apparatus of claim 3, wherein the similarity metric corresponds to block prediction modes and the primary reference frame is determined as the reference frame of the list of reference frames associated with the second value representing percentages of blocks predicted using intra prediction and using inter prediction that are closest to percentages of blocks predicted using intra prediction and using inter prediction of the current frame.
6. The apparatus of claim 3, wherein, to determine the reference frame associated with the second value that is closest to the first value, the processor is configured to execute the instructions to: determine that multiple reference frames of the list of reference frames are associated with the second value that is closest to the first value; and responsive to the determination that the multiple reference frames are associated with the second value that is closest to the first value, determine, as the primary reference frame, a reference frame of the multiple reference frames that is most recently decoded.
7. A non-transitory computer readable medium having stored thereon an encoded bitstream, wherein the encoded bitstream is configured for decoding by operations for reference frame selection and signaling for frame context initialization, the operations comprising: determining whether a primary reference frame of a current frame to decode is an optimal reference frame of the current frame; responsive to a determination that the primary reference frame is the optimal reference frame, initializing frame contexts of the current frame according to frame contexts of the primary reference frame;responsive to a determination that the primary reference frame is other than the optimal reference frame, initializing the frame contexts of the current frame according to frame contexts of the optimal reference frame; and entropy coding the current frame using the initialized frame contexts to produce entropy decoded data usable to reconstruct the current frame.
8. The non-transitory computer readable medium of claim 7, the operations comprising: determining a list of reference frames available for predicting the current frame based on a frame header of the current frame within the encoded bitstream, wherein the frame header includes a first symbol used to determine whether the primary reference frame is the optimal reference frame, and wherein, where the primary reference frame is other than the optimal reference frame, the frame header includes a second symbol used to determine the optimal reference frame.
9. The non-transitory computer readable medium of claim 8, wherein initializing the frame contexts of the current frame according to the frame contexts of the primary reference frame comprises: determining, based on the first symbol indicating that the primary reference frame is the optimal reference frame, the primary reference frame from amongst the list of reference frames based on a similarity metric comparing reference frames of the list of reference frames against the current frame.
10. The non-transitory computer readable medium of claim 9, wherein determining the primary reference frame from amongst the list of reference frames based on the similarity metric comprises: determining a first value for the similarity metric based on the current frame; determining a second value for the similarity metric based on each reference frame of the list of reference frames; and determining, as the primary reference frame, a reference frame of the list of reference frames associated with the second value that is closest to the first value.
11. The non-transitory computer readable medium of any one of claims 9 or 10, wherein the similarity metric corresponds to one or more of quantizer parameters or blockprediction modes.
12. The non-transitory computer readable medium of claim 8, wherein initializing the frame contexts of the current frame according to the frame contexts of the optimal reference frame comprises: determining, based on the first symbol indicating that the primary reference frame is other than the optimal reference frame, the optimal reference frame using a reference frame list index indicated by the second symbol.
13. The non-transitory computer readable medium of any one of claims 7, 8, 9, or 10, the operations comprising: determining whether the primary reference frame is the optimal reference frame.
14. A method for reference frame selection and signaling for frame context initialization, the method comprising: selecting, as a reference frame from amongst a list of reference frames available for predicting a current frame to decode, one of a primary reference frame of the current frame or an optimal reference frame of the current frame; initializing frame contexts of the current frame according to frame contexts of the selected reference frame; and entropy coding the current frame using the initialized frame contexts to produce entropy decoded data usable to reconstruct the current frame.
15. The method of claim 14, comprising: determining, based on a first symbol signaled within an encoded bitstream to which the current frame is encoded, whether the primary reference frame is the optimal reference frame.
16. The method of claim 15, wherein selecting the one of the primary reference frame or the optimal reference frame comprises one of: selecting the primary reference frame responsive to a determination, based on the first symbol, that the primary reference frame is the optimal reference frame; or selecting the optimal reference frame responsive to a determination, based on the first symbol, that the primary reference frame is other than the optimal reference frame.
17. The method of claim 16, wherein the primary reference frame is selected as the reference frame and the method comprises: determining the primary reference frame from amongst the list of reference frames based on a similarity metric comparing reference frames of the list of reference frames against the current frame.
18. The method of claim 17, wherein determining the primary reference frame from amongst the list of reference frames based on the similarity metric comprises: determining a first value for the similarity metric based on the current frame; determining a second value for the similarity metric based on each reference frame of the list of reference frames; and determining, as the primary reference frame, a reference frame of the list of reference frames associated with the second value that is closest to the first value.
19. The method of claim 16, wherein the optimal reference frame is selected as the reference frame and the method comprises: determining, based on a second symbol signaled within the encoded bitstream, the optimal reference frame from amongst the list of reference frames based on an index indicated by the second symbol.
20. The method of any one of claims 15, 16, 17, 18, or 19, comprising: determining the list of reference frames based on a frame header associated with the current frame.