EP4436176A2 - Improved entropy coding in image and video decompression using machine learning - Google Patents
Improved entropy coding in image and video decompression using machine learning Download PDFInfo
- Publication number
- EP4436176A2 EP4436176A2 EP24182040.6A EP24182040A EP4436176A2 EP 4436176 A2 EP4436176 A2 EP 4436176A2 EP 24182040 A EP24182040 A EP 24182040A EP 4436176 A2 EP4436176 A2 EP 4436176A2
- Authority
- EP
- European Patent Office
- Prior art keywords
- probability distribution
- syntax elements
- video block
- refined
- probabilities
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/10—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
- H04N19/102—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
- H04N19/13—Adaptive entropy coding, e.g. adaptive variable length coding [AVLC] or context adaptive binary arithmetic coding [CABAC]
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T9/00—Image coding
- G06T9/002—Image coding using neural networks
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V10/00—Arrangements for image or video recognition or understanding
- G06V10/40—Extraction of image or video features
- G06V10/50—Extraction of image or video features by performing operations within image blocks; by using histograms, e.g. histogram of oriented gradients [HoG]; by summing image-intensity values; Projection analysis
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/10—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
- H04N19/102—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
- H04N19/103—Selection of coding mode or of prediction mode
- H04N19/11—Selection of coding mode or of prediction mode among a plurality of spatial predictive coding modes
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/10—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
- H04N19/102—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
- H04N19/124—Quantisation
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/10—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
- H04N19/134—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
- H04N19/136—Incoming video signal characteristics or properties
- H04N19/14—Coding unit complexity, e.g. amount of activity or edge presence estimation
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/10—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
- H04N19/134—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
- H04N19/157—Assigned coding mode, i.e. the coding mode being predefined or preselected to be further used for selection of another element or parameter
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/10—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
- H04N19/169—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
- H04N19/17—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object
- H04N19/176—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object the region being a block, e.g. a macroblock
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/10—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
- H04N19/169—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
- H04N19/18—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being a set of transform coefficients
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/10—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
- H04N19/189—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the adaptation method, adaptation tool or adaptation type used for the adaptive coding
- H04N19/192—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the adaptation method, adaptation tool or adaptation type used for the adaptive coding the adaptation method, adaptation tool or adaptation type being iterative or recursive
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/10—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
- H04N19/189—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the adaptation method, adaptation tool or adaptation type used for the adaptive coding
- H04N19/192—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the adaptation method, adaptation tool or adaptation type used for the adaptive coding the adaptation method, adaptation tool or adaptation type being iterative or recursive
- H04N19/194—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the adaptation method, adaptation tool or adaptation type used for the adaptive coding the adaptation method, adaptation tool or adaptation type being iterative or recursive involving only two passes
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/50—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding
- H04N19/593—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding involving spatial prediction techniques
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/60—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using transform coding
- H04N19/61—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using transform coding in combination with predictive coding
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/70—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals characterised by syntax aspects related to video coding, e.g. related to compression standards
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/90—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using coding techniques not provided for in groups H04N19/10-H04N19/85, e.g. fractals
- H04N19/91—Entropy coding, e.g. variable length coding [VLC] or arithmetic coding
Definitions
- Digital video streams may represent video using a sequence of frames or still images.
- Digital video can be used for various applications including, for example, video conferencing, high definition video entertainment, video advertisements, or sharing of user-generated videos.
- a digital video stream can contain a large amount of data and consume a significant amount of computing or communication resources of a computing device for processing, transmission, or storage of the video data.
- Various approaches have been proposed to reduce the amount of data in video streams, including encoding or decoding techniques.
- a method for encoding a video block to a bitstream includes determining a probability distribution for quantized transform coefficients of the video block.
- a set of features is extracted from video data associated with one or both of the video block or one or more neighbor blocks of the video block.
- the probability distribution and the set of features are processed using machine learning to produce a refined probability distribution.
- the quantized transform coefficients of the video block are entropy encoded according to the refined probability distribution to produce an encoded video block.
- the encoded video block is then output to the bitstream.
- a method for decoding an encoded video block from a bitstream includes deriving syntax elements representative of the encoded video block from the bitstream.
- a probability distribution is determined for the syntax elements.
- a set of features is extracted from video data decoded from the bitstream. The probability distribution and the set of features are processed using machine learning to produce a refined probability distribution.
- the syntax elements are entropy decoded according to the refined probability distribution to produce quantized transform coefficients.
- the quantized transform coefficients are dequantized to produce transform coefficients.
- the transform coefficients are inverse transformed to produce a prediction residual.
- the prediction residual is reconstructed to produce a decoded video block.
- the decoded video block is then output to an output video stream.
- An apparatus for encoding a video block to a bitstream includes a memory and a processor.
- the processor is configured to execute instructions stored in the memory.
- the instructions include instructions to determine a probability distribution for quantized transform coefficients of the video block, identify a set of features, process the probability distribution and the set of features using machine learning to produce a refined probability distribution, entropy encode the quantized transform coefficients of the video block according to the refined probability distribution to produce an encoded video block, and output the encoded video block to the bitstream.
- the set of features is identified based on one or more of video data associated with the video block, video data associated with one or more neighbor blocks of the video block, or coding modes used for encoding the one or more neighbor blocks.
- An apparatus for decoding an encoded video block from a bitstream includes a memory and a processor.
- the processor is configured to execute instructions stored in the memory.
- the instructions include instructions to determine a probability distribution for syntax elements representative of the encoded video block in which the syntax elements derived from the bitstream, identify a set of features, process the probability distribution and the set of features using machine learning to produce a refined probability distribution, entropy decode the syntax elements according to the refined probability distribution to produce quantized transform coefficients, further decode the quantized transform coefficients to produce a decoded video block, and output the decoded video block to an output video stream.
- the set of features is identified based on one or more of video data associated with the encoded video block, video data associated with one or more neighbor blocks of the encoded video block, or coding modes used for decoding the one or more neighbor blocks.
- An encoder performs operations for encoding a video block to a bitstream.
- the operations include using machine learning to refine a probability distribution for quantized transform coefficients of the video block based on a set of features extracted from one or both of the video block or one or more neighbor blocks of the video block.
- the quantized transform coefficients of the video block are encoded to produce an encoded video block in which encoding the quantized transform coefficients of the video block includes entropy encoding the quantized transform coefficients of the video block according to the refined probability distribution.
- the encoded video block is output to the bitstream.
- a decoder performs operations for decoding an encoded video block from a bitstream.
- the operations include using machine learning to refine a probability distribution for syntax elements representative of the encoded video block based on a set of features extracted from video data decoded from the bitstream.
- the syntax elements are decoded to produce a decoded video block in which decoding the syntax elements includes entropy decoding the syntax elements according to the refined probability distribution.
- the decoded video block is output to an output video stream.
- Video compression schemes may include breaking respective images, or frames, of an input video stream 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 of bits required to encode video data to or decode video data from a bitstream.
- entropy encoding may include using probability distributions of symbol values to encode to a bitstream, such as to reduce the amount of data that needs to be encoded.
- a decoder may then entropy decode the encoded symbols as syntax elements from the bitstream using those probability distributions.
- the probability values of a probability distribution indicate the likelihood that a particular symbol of video data (e.g., a quantized transform coefficient of a transform block) will have a particular value (e.g., 0 or 1 for binary cases or other values for non-binary cases).
- the probabilities of the probability distribution may be stored in the form of a cumulative density function where the probability of a first symbol value is p0, the probability of first two symbol values is p0 + p1, the probability of the first three symbol values is p0 + p1 + p2, and so on.
- the probability values of a probability distribution may be updated during encoding or decoding, such as based on observations of the symbol values to encode or decode.
- the probability distributions 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. In this way, the total number of bits required to code video data can be minimized.
- the probability distribution indicates the probabilities of the particular symbol values occurring within a symbol sequence or set to encode or decode, but without reference to other aspects of the input video stream or bitstream.
- Implementations of this disclosure address problems such as these by using machine learning to refine probability distributions of symbol values of video data prior to entropy coding the symbol values.
- a probability distribution is determined for quantized transform coefficients of a video block, and a set of features is extracted from video data associated with the video block and/or one or more neighbor blocks of the video block.
- the probability distribution and the set of features are then processed using machine learning to produce a refined probability distribution.
- the quantized transform coefficients of the video block are entropy encoded according to the refined probability distribution to produce an encoded video block.
- the encoded video block is then output to an output video stream.
- syntax elements representative of an encoded video block are derived from the bitstream.
- a probability distribution is determined for the syntax elements, and a set of features is extracted from video data decoded from the bitstream.
- the probability distribution and the set of features are then processed using machine learning to produce a refined probability distribution.
- the syntax elements are entropy decoded according to the refined probability distribution to produce quantized transform coefficients.
- the quantized transform coefficients are dequantized to produce transform coefficients.
- the transform coefficients are inverse transformed to produce a prediction residual.
- the prediction residual is reconstructed to produce a decoded video block.
- the decoded video block is then output to an output video stream.
- 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 .
- the processing of the transmitting station 102 can be distributed among multiple devices.
- a network 104 can connect the transmitting station 102 and a receiving station 106 for encoding and decoding of the video stream.
- 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.
- 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.
- an implementation can omit the network 104.
- 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.
- 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.
- a real-time transport protocol RTP
- a transport protocol other than RTP may be used (e.g., a Hypertext Transfer Protocol-based (HTTP-based) video streaming protocol).
- 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.
- 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.
- the video encoding and decoding system 100 may instead be used to encode and decode data other than video data.
- 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.
- 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.
- 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 pre-encoded image data from the transmitting station 102.
- 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.
- FIG. 2 is a block diagram of an example of a computing device 200 that can implement a transmitting station or a receiving station.
- 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.
- a processor 202 in the computing device 200 can be a conventional central processing unit.
- the processor 202 can be another type of device, or multiple devices, capable of manipulating or processing information now existing or hereafter developed.
- 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.
- 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.
- the application programs 210 can include applications 1 through N, which further include a video and/or image coding application that performs the techniques described herein.
- 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.
- a secondary storage 214 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.
- 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.
- 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.
- LCD liquid crystal display
- CRT cathode-ray tube
- LED light emitting diode
- OLED organic LED
- 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.
- 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.
- the computing device 200 can also include or be in communication with a sound-sensing 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.
- 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.
- the bus 212 of the computing device 200 can be composed of multiple buses.
- 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.
- FIG. 3 is a diagram of an example of a video stream 300 to be encoded and subsequently decoded.
- the video stream 300 includes a video sequence 302.
- the video sequence 302 includes a number of adjacent 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 frames, for example, a frame 306.
- 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.
- 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.
- the frame 306 may be further subdivided into blocks 310, which can contain data corresponding to, for example, 16x16 pixels in the frame 306.
- the blocks 310 can also be arranged to include data from one or more segments 308 of pixel data.
- the blocks 310 can also be of any other suitable size such as 4x4 pixels, 8x8 pixels, 16x8 pixels, 8x16 pixels, 16x16 pixels, or larger. Unless otherwise noted, the terms block and macroblock are used interchangeably herein.
- FIG. 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 one particularly desirable implementation, the encoder 400 is a hardware encoder.
- 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.
- 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.
- respective adjacent frames 304 can be processed in units of blocks.
- respective blocks can be encoded using intra-frame prediction (also called intra-prediction) or inter-frame prediction (also called inter-prediction).
- intra-frame prediction also called intra-prediction
- inter-frame prediction also called inter-prediction
- a prediction block can be formed.
- intra-prediction a prediction block may be formed from samples in the current frame that have been previously encoded and reconstructed.
- inter-prediction a prediction block may be formed from samples in one or more previously constructed reference frames.
- 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.
- 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 (VLC) or arithmetic coding.
- VLC variable length 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.
- 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).
- 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.
- filters include, without limitation: a deblocking filter as in H.264, VP9, HEVC, and AV1; a Constrained Directional Enhancement Filter as in AV 1; and a loop restoration filter as in AV1.
- a non-transform based encoder can quantize the residual signal directly without the transform stage 404 for certain blocks or frames.
- an encoder can have the quantization stage 406 and the dequantization stage 410 combined in a common stage.
- 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.
- 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.
- stages to perform various functions to produce an output video stream 516 from the compressed bitstream 420 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.
- 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.
- 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).
- 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.
- Other filtering can be applied to the reconstructed block.
- 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.
- decoder 500 can be used to decode the compressed bitstream 420.
- the decoder 500 can produce the output video stream 516 without the post filter stage 514.
- FIG. 6 is a block diagram of an example of an entropy coder 600 that uses machine learning for encoding or decoding.
- the entropy coder 600 represents functionality for entropy coding video data, such as to or from a bitstream (e.g., the bitstream 420 shown in FIGS. 4 and 5 ).
- the entropy coder 600 can represent functionality for entropy encoding symbols to a bitstream, such as functionality performed at the entropy encoding stage 408 of the encoder 400 shown in FIG. 4 .
- the entropy coder 600 can represent functionality for entropy decoding symbols from a bitstream, such as functionality performed at the entropy decoding stage 502 shown in FIG. 5 .
- the Input received to the entropy coder 600 includes a probability distribution 602 and a set of features 604.
- the probability distribution 602 indicates probabilities for the possible values to be encoded to or to be decoded from a bitstream, as applicable. For example, where the values to be encoded or decoded represent binarized video data, the probability distribution 602 can include a first probability for the value 0 and a second probability for the value 1. In another example, where the values to be encoded or decoded represent non-binary video data, the probability distribution 602 can include N probabilities, where N is the number of different values which may be encoded or decoded.
- the set of features 604 includes video information related to the video block to entropy code using the entropy coder 600 and/or one or more neighbor blocks of that video block.
- the set of features 604 is identified based on one or more of video data associated with the video block, video data associated with one or more neighbor blocks of the video block, or coding modes used for encoding the one or more neighbor blocks.
- the features of the set of features 604 may, for example, correspond to differences in pixel values of the video block along one or more different directions, edges or pixel attributes for the video block, intra-prediction modes used for encoding the one or more neighbor blocks of the video block, local image textures within the video block and/or the one or more neighbor blocks of the video block, other video data, or a combination thereof.
- the machine learning stage 606 processes the probability distribution 602 and the set of features 604 using machine learning to produce a refined probability distribution 608. Processing the probability distribution 602 and the set of features 604 using machine learning includes applying a machine learning model to the probability distribution 602 and the set of features 604 using machine learning.
- the machine learning model used by the machine learning stage 606 may, for example, be or include a neural network, a deep neural network, a support vector machine, a cluster network, a Bayesian network, a genetic algorithm, or another model.
- the refined probability distribution 608 is a distribution of probability values which have been updated based on the processing at the machine learning stage 606.
- the refined probability distribution 608 can be produced by updating some or all of the probabilities of the probability distribution 602.
- the refined probability distribution 608 may include one or more probability values that is or are different from the respective probability value or values of the probability distribution 602.
- the symbols 610 include one or more symbols, which may be commonly associated with a video aspect (e.g., a block of a video frame, a portion of a block, a segment or tile of a video frame, or another video aspect).
- the symbols 610 may represent binarized video data such that each symbol of the symbols 610 has a value of 0 or 1.
- the symbols 610 may represent non-binary video data such that each symbol of the symbols 610 may have a value of 0, 1, 2, or 3, or may have another value.
- the machine learning model is trained according to previous probability distributions and previous video data to recognize and process the probability distribution 602 and the set of features 604.
- the machine learning stage 606 functions to use a machine learning model (e.g., a neural network) that is trained to minimize cross-entropy loss between the symbols 610 (e.g., quantized transform coefficients, syntax elements, or other symbols) and the refined probability distribution 608 produced by the machine learning stage 606.
- a machine learning model e.g., a neural network
- An entropy coding stage 612 entropy codes the symbols 610 according to the refined probability distribution 608.
- Entropy coding the symbols 610 according to the refined probability distribution 608 can include arithmetic coding the symbols 610 using refined values of the refined probability distribution 608.
- the arithmetic coding can be used to code each of the symbols 610 based on the probability of those symbols 610 occurring in the video stream from which the symbols 610 are encoded or in the bitstream to which the symbols are decoded. For example, ones of the symbols 610 having higher probabilities can be arithmetic coded using smaller numbers of bits, whereas ones of the symbols 610 having lower probabilities can be arithmetic coded using larger numbers of bits. In some cases, techniques other than arithmetic coding can be used by the entropy coding stage 612.
- the arithmetic coding or other technique used by the entropy coding stage 612 to reduce the symbols 610 to one or more bits defines a compression throughput for the entropy coding stage 612 and, therefore, for the entropy coder 600.
- the compression throughput refers to the efficacy of the entropy coding stage 612 to minimize the number of bits used to represent the symbols 610, either to a bitstream or from a bitstream.
- a compression throughput resulting from entropy coding the symbols 610 e.g., quantized transform coefficients, syntax elements, or other video data
- the refined probability distribution 608 is greater than a compression throughput resulting from entropy coding the symbols according to the probability distribution 602.
- the probability distribution 602 may be used to update values stored in a probability table accessed by the entropy coder 600.
- a probability table that stores values used to determine the probability distribution 602 can be updated according to the probability distribution 602, rather than the refined probability distribution 608. Updating the probability table includes changing one or more values stored in the probability table according to the probability distribution 602 after the symbols 610 are entropy coded according to the refined probability distribution 608 at the entropy coding stage 612.
- FIG. 7 is a flowchart diagram of an example of a technique 700 for entropy encoding quantized transform coefficients of a video block to a bitstream using machine learning.
- FIG. 8 is a flowchart diagram of an example of a technique 800 for entropy decoding syntax elements representative of an encoded video block from a bitstream using machine learning.
- 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.
- 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.
- a hardware component configured to perform the technique 700 and/or the technique 800.
- 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.
- the technique 700 and technique 800 are both 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.
- the technique 700 for entropy encoding quantized transform coefficients of a video block to a bitstream using machine learning is shown.
- a probability distribution for the quantized transform coefficients is determined.
- the quantized transform coefficients are coefficients of the video block after the video block is processed at prediction, transform, and quantization stages of an encoder, for example, the intra/inter prediction stage 402, the transform stage 404, and the quantization stage 406 of the encoder 400 shown in FIG. 4 .
- the probability distribution for the quantized transform coefficients is a distribution of the probabilities for each possible value of the quantized transform coefficients.
- the probability distribution can be stored in and retrieved from a probability table.
- the probability values of the probability distribution may be stored in the form of a cumulative density function.
- a set of features is extracted from video data associated with one or both of the video block or one or more neighbor blocks of the video block.
- the set of features is identified based on one or more of video data associated with the video block, video data associated with one or more neighbor blocks of the video block, or coding modes used for encoding the one or more neighbor blocks.
- the features of the set of features may, for example, correspond to differences in pixel values of the video block along one or more different directions, edges or pixel attributes for the video block, intra-prediction modes used for encoding the one or more neighbor blocks of the video block, local image textures within the video block and/or the one or more neighbor blocks of the video block, other video data, or a combination thereof.
- the probability distribution and the set of features are processed using machine learning to produce a refined probability distribution.
- Using the machine learning to produce the refined probability distribution includes feeding the probability distribution and the set of features into a machine learning model.
- the machine learning model is a machine learning aspect which has been trained according to previous probability distributions and previous video data to recognize and process the probability distribution and the set of features.
- the machine learning model is trained to process information identified, produced, selected, or otherwise determined using the probability distribution and the set of features.
- the set of features extracted from the video data may, for example, correspond to differences in pixel values of the video block. For example, those pixel values may pertain to already reconstructed portions of the block context for the video block.
- a histogram of oriented gradients e.g., a normalized histogram of oriented gradients
- the machine learning model can be used to process the histogram of oriented gradients (i.e., the set of features may include a histogram of oriented gradients).
- the set of features includes a different type of feature descriptor instead of or in addition to the histogram of oriented gradients, for example, an edge orientation histogram, a scale-invariant feature transform descriptor, or a shape context.
- a different type of feature descriptor instead of or in addition to the histogram of oriented gradients, for example, an edge orientation histogram, a scale-invariant feature transform descriptor, or a shape context.
- the refined probability distribution can then be produced by updating the probability distribution based on the normalized histogram of oriented gradients.
- the machine learning model trained using the previous probability distributions and previous video data can be trained to determine probabilities of different directions of the pixel differences based on the normalized histogram of oriented gradients. The machine learning model can then cause those probabilities to be used to update the probability distribution.
- updating the probability distribution based on the normalized histogram of oriented gradients can include discarding the probabilities of the different directions of the pixel differences.
- the refined probability distribution can be the probability distribution as originally received from the probability table.
- the machine learning model can be used to process directions of intra-prediction modes used to encode one or more neighbor blocks of the video block.
- the set of features from the video data may, for example, correspond to different directions of those intra-prediction modes used for encoding the neighbor blocks.
- the machine learning model can process the different directions of the intra-prediction modes used for encoding the neighbor blocks to determine probabilities of prediction directions for the quantized transform coefficients of the video block.
- the refined probability distribution can then be produced by updating the probability distribution based on the probabilities of the prediction directions.
- updating the probability distribution based on the probabilities of the prediction directions can include discarding the probabilities of the prediction directions.
- the refined probability distribution can be the probability distribution as originally received from the probability table.
- a machine learning model can be used to process other video data, such as video data from the video block, video data from one or more neighbor blocks of the video block, video data from other aspects of the input video stream, or a combination thereof.
- the quantized transform coefficients of the video block are entropy encoded according to the refined probability distribution.
- Entropy encoding the quantized transform coefficients according to the refined probability distribution includes using an entropy encoding technique, for example, arithmetic coding, to determine numbers of bits to use to encode the quantized transform coefficients based on the probabilities of the refined probability distribution, so as to minimize the number of bits required to signal the quantized transform coefficients within a bitstream.
- the encoded video block is output to the bitstream.
- the technique 700 may include updating the probability distribution after entropy encoding the quantized transform coefficients.
- a probability table that stores values used to determine the probability distribution can be updated according to the probability distribution, rather than the refined probability distribution.
- the probability distribution can be used to update the values stored in the probability table on a symbol-by-symbol basis such that the probabilities of the probability distribution are updated after processing individual ones of the symbols. Updating the probability table includes changing one or more values stored in the probability table according to the probability distribution for the quantized transform coefficients.
- the technique 800 for entropy decoding syntax elements representative of an encoded video block from a bitstream using machine learning is shown.
- the syntax elements are derived from the bitstream. Deriving the syntax elements can include decoding a portion of the bitstream corresponding to the encoded video block, a portion of the bitstream corresponding to an encoded video frame that includes the encoded video block, or another portion of the bitstream.
- a probability distribution for the syntax elements is determined. Determining the probability distribution can include retrieving values from a probability table.
- the probability table may be a table or other data store which stores values used to determine the probability distribution.
- the values may be probability values of a cumulative density function.
- the probability table may be a table accessible to a decoder used to entropy decode the syntax elements from the bitstream.
- a set of features is extracted from video data decoded from the bitstream.
- the set of features can be features from the encoded video block and/or from one or more neighbor blocks of the encoded video block.
- extracting the set of features can include identifying the set of features based on one or more of video data associated with the encoded video block, video data associated with one or more neighbor blocks of the encoded video block, or coding modes used for decoding the one or more neighbor blocks.
- the probability distribution and the set of features are processed using machine learning to produce a refined probability distribution.
- Using the machine learning to produce the refined probability distribution includes feeding the probability distribution and the set of features into a machine learning model.
- the machine learning model is a machine learning aspect which has been trained according to previous probability distributions and previous video data to recognize and process the probability distribution and the set of features.
- the machine learning model is trained to process information identified, produced, selected, or otherwise determined using the probability distribution and the set of features.
- the machine learning model can be used to process a normalized histogram of oriented gradients.
- the set of features extracted from the video data may, for example, correspond to differences in pixel values of the encoded video block. For example, those pixel values may pertain to already reconstructed portions of the block context for the encoded video block.
- the normalized histogram of oriented gradients can be computed based on different directions of the differences in those pixel values.
- the refined probability distribution can then be produced by updating the probability distribution based on the normalized histogram of oriented gradients.
- the machine learning model trained using the previous probability distributions and previous video data can be trained to determine probabilities of different directions of the pixel differences based on the normalized histogram of oriented gradients. The machine learning model can then cause those probabilities to be used to update the probability distribution.
- updating the probability distribution based on the normalized histogram of oriented gradients can include discarding the probabilities of the different directions of the pixel differences.
- the refined probability distribution can be the probability distribution as originally received from the probability table.
- the machine learning model can be used to process directions of intra-prediction modes used to decode one or more neighbor blocks of the encoded video block.
- the set of features from the video data may, for example, correspond to different directions of those intra-prediction modes used for decoding the neighbor blocks.
- the machine learning model can process the different directions of the intra-prediction modes used for decoding the neighbor blocks to determine probabilities of prediction directions for the syntax elements of the encoded video block.
- the refined probability distribution can then be produced by updating the probability distribution based on the probabilities of the prediction directions.
- updating the probability distribution based on the probabilities of the prediction directions can include discarding the probabilities of the prediction directions.
- the refined probability distribution can be the probability distribution as originally received from the probability table.
- a machine learning model can be used to process other video data, such as video data from the encoded video block, video data from one or more neighbor blocks of the encoded video block, video data from other aspects of the bitstream, or a combination thereof.
- the syntax elements representative of the encoded video block are entropy decoded according to the refined probability distribution.
- Entropy decoding the syntax elements according to the refined probability distribution includes using an entropy decoding technique, for example, arithmetic coding, to determine symbols that correspond to each of the syntax elements based on the probabilities of the refined probability distribution.
- the quantized transform coefficients are further decoded to produce a decoded video block.
- Further decoding the quantized transform coefficients includes dequantizing the quantized transform coefficients to produce transform coefficients, inverse transforming the transform coefficients to produce a prediction residual, and reconstructing the prediction residual to produce the decoded video block.
- the further decoding can be performed at the dequantization stage 504, the inverse transform stage 506, the intra/inter prediction stage 508, and the reconstruction stage 510 of the decoder 500 shown in FIG. 5 .
- the decoded video block is output to an output video stream.
- the technique 800 may include updating the probability distribution after entropy decoding the syntax elements.
- a probability table that stores values used to determine the probability distribution can be updated according to the probability distribution, rather than the refined probability distribution.
- the probability distribution can be used to update the values stored in the probability table on a symbol-by-symbol basis such that the probabilities of the probability distribution are updated after processing individual ones of the symbols. Updating the probability table includes changing one or more values stored in the probability table according to the probability distribution for the syntax elements.
- 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.
- 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.
- Implementations of the transmitting station 102 and/or the receiving station 106 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.
- IP intellectual property
- ASICs application-specific integrated circuits
- programmable logic arrays optical processors
- programmable logic controllers programmable logic controllers
- microcode microcontrollers
- servers microprocessors, digital signal processors, or any other suitable circuit.
- signal processors digital signal processors
- 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.
- a special purpose computer/processor can be utilized which can contain other hardware for carrying out any of the methods, algorithms, or instructions described herein.
- the transmitting station 102 and the receiving station 106 can, for example, be implemented on computers in a video conferencing system.
- 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.
- the transmitting station 102 using an encoder 400, can encode content into an encoded video signal and transmit the encoded video signal to the communications device.
- the communications device can then decode the encoded video signal using a decoder 500.
- the communications device can decode content stored locally on the communications device, for example, content that was not transmitted by the transmitting station 102.
- the receiving station 106 can be a generally stationary personal computer rather than a portable communications device, and/or a device including an encoder 400 may also include a decoder 500.
- 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.
- a method for decoding an encoded video block from a bitstream comprising:
- Clause 2 The method of clause 1, wherein a compression throughput resulting from entropy decoding the syntax elements according to the refined probability distribution is greater than a compression throughput resulting from entropy decoding the syntax elements according to the probability distribution.
- Clause 3 The method of clause 1 or 2, wherein extracting the set of features from video data decoded from the bitstream comprises: identifying the set of features based on one or more of video data associated with the encoded video block, video data associated with one or more neighbor blocks of the encoded video block, or coding modes used for decoding the one or more neighbor blocks.
- Clause 4 The method of clause 3, wherein the set of features corresponds to differences in pixel values of the encoded video block along one or more different directions, and processing the probability distribution and the set of features using machine learning to produce the refined probability distribution comprises:
- Clause 5 The method of clause 3, wherein the set of features corresponds to intra-prediction modes used for decoding the one or more neighbor blocks, and processing the probability distribution and the set of features using machine learning to produce the refined probability distribution comprises:
- Clause 6 The method of any of clauses 1 to 5, wherein the probability distribution is determined based on values stored in a probability table, the method further comprising: updating the values stored in the probability table according to the probability distribution for the syntax elements.
- Clause 7 The method of any of clauses 1 to 5, wherein the machine learning uses a neural network that is trained to minimize cross-entropy loss between the syntax elements and the refined probability distribution.
- An apparatus for decoding an encoded video block from a bitstream comprising: a processor configured to:
- Clause 9 The apparatus of clause 8, wherein a compression throughput resulting from entropy decoding the syntax elements according to the refined probability distribution is greater than a compression throughput resulting from entropy decoding the syntax elements according to the probability distribution.
- Clause 10 The apparatus of clause 8 or 9, wherein the processor is configured to identify the set of features based on the one or more of the video data associated with the encoded video block, the video data associated with the one or more neighbor blocks of the encoded video block, or the coding modes used for decoding the one or more neighbor blocks by: extracting the one or more of the video data associated with the encoded video block, the video data associated with the one or more neighbor blocks of the encoded video block, or the coding modes used for decoding the one or more neighbor blocks from the bitstream.
- Clause 11 The apparatus of clause 10, wherein the set of features corresponds to differences in pixel values of the encoded video block along one or more different directions, and the processor is configured to process the probability distribution and the set of features using machine learning to produce the refined probability distribution by:
- Clause 12 The apparatus of clause 10, wherein the set of features corresponds to intra-prediction modes used for decoding the one or more neighbor blocks, and the processor is configured to process the probability distribution and the set of features using machine learning to produce the refined probability distribution by:
- Clause 13 The apparatus of any of clauses 8 to 12, wherein the probability distribution is determined based on values stored in a probability table, and the processor is configured to: update the values stored in the probability table according to the probability distribution for the syntax elements.
- Clause 14 The apparatus of any of clauses 8 to 13, wherein the machine learning uses a neural network that is trained to minimize cross-entropy loss between the syntax elements and the refined probability distribution.
- Clause 15 The apparatus of any of clauses 8 to 14, wherein the apparatus is implemented by the processor executing instructions stored in a memory.
- a decoder that performs operations for decoding an encoded video block from a bitstream, the operations comprising:
- Clause 17 The decoder of clause 16, wherein a compression throughput resulting from entropy decoding the syntax elements according to the refined probability distribution is greater than a compression throughput resulting from entropy decoding the syntax elements according to the probability distribution.
- Clause 18 The decoder of clause 16 or 17, wherein the probability distribution is determined based on values stored in a probability table, and the decoder performs operations for updating the values stored in the probability table after entropy decoding the syntax elements according to the refined probability distribution.
- Clause 19 The decoder of any of clauses 16 to 18, wherein the set of features relates to one or more of video data associated with the encoded video block, video data associated with one or more neighbor blocks of the encoded video block, or coding modes used for decoding the one or more neighbor blocks.
- Clause 20 The decoder of any of clauses 16 to 19, wherein the set of features corresponds to differences in pixel values of the encoded video block along one or more different directions, and wherein using machine learning to refine the probability distribution for the syntax elements representative of the encoded video block based on the set of features extracted from video data decoded from the bitstream comprises:
- Clause 21 The decoder of any of clauses 16 to 19, wherein the set of features corresponds to intra-prediction modes used for decoding one or more neighbor blocks of the encoded video block, and wherein using machine learning to refine the probability distribution for the syntax elements representative of the encoded video block based on the set of features extracted from video data decoded from the bitstream comprises:
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Artificial Intelligence (AREA)
- Evolutionary Computation (AREA)
- Compression Or Coding Systems Of Tv Signals (AREA)
- Image Analysis (AREA)
- Compression, Expansion, Code Conversion, And Decoders (AREA)
Abstract
Description
- Digital video streams may represent video using a sequence of frames or still images. Digital video can be used for various applications including, for example, video conferencing, high definition video entertainment, video advertisements, or sharing of user-generated videos. A digital video stream can contain a large amount of data and consume a significant amount of computing or communication resources of a computing device for processing, transmission, or storage of the video data. Various approaches have been proposed to reduce the amount of data in video streams, including encoding or decoding techniques.
- A method for encoding a video block to a bitstream according to an implementation of this disclosure includes determining a probability distribution for quantized transform coefficients of the video block. A set of features is extracted from video data associated with one or both of the video block or one or more neighbor blocks of the video block. The probability distribution and the set of features are processed using machine learning to produce a refined probability distribution. The quantized transform coefficients of the video block are entropy encoded according to the refined probability distribution to produce an encoded video block. The encoded video block is then output to the bitstream.
- A method for decoding an encoded video block from a bitstream according to an implementation of this disclosure includes deriving syntax elements representative of the encoded video block from the bitstream. A probability distribution is determined for the syntax elements. A set of features is extracted from video data decoded from the bitstream. The probability distribution and the set of features are processed using machine learning to produce a refined probability distribution. The syntax elements are entropy decoded according to the refined probability distribution to produce quantized transform coefficients. The quantized transform coefficients are dequantized to produce transform coefficients. The transform coefficients are inverse transformed to produce a prediction residual. The prediction residual is reconstructed to produce a decoded video block. The decoded video block is then output to an output video stream.
- An apparatus for encoding a video block to a bitstream includes a memory and a processor. The processor is configured to execute instructions stored in the memory. The instructions include instructions to determine a probability distribution for quantized transform coefficients of the video block, identify a set of features, process the probability distribution and the set of features using machine learning to produce a refined probability distribution, entropy encode the quantized transform coefficients of the video block according to the refined probability distribution to produce an encoded video block, and output the encoded video block to the bitstream. The set of features is identified based on one or more of video data associated with the video block, video data associated with one or more neighbor blocks of the video block, or coding modes used for encoding the one or more neighbor blocks.
- An apparatus for decoding an encoded video block from a bitstream includes a memory and a processor. The processor is configured to execute instructions stored in the memory. The instructions include instructions to determine a probability distribution for syntax elements representative of the encoded video block in which the syntax elements derived from the bitstream, identify a set of features, process the probability distribution and the set of features using machine learning to produce a refined probability distribution, entropy decode the syntax elements according to the refined probability distribution to produce quantized transform coefficients, further decode the quantized transform coefficients to produce a decoded video block, and output the decoded video block to an output video stream. The set of features is identified based on one or more of video data associated with the encoded video block, video data associated with one or more neighbor blocks of the encoded video block, or coding modes used for decoding the one or more neighbor blocks.
- An encoder according to an implementation of this disclosure performs operations for encoding a video block to a bitstream. The operations include using machine learning to refine a probability distribution for quantized transform coefficients of the video block based on a set of features extracted from one or both of the video block or one or more neighbor blocks of the video block. The quantized transform coefficients of the video block are encoded to produce an encoded video block in which encoding the quantized transform coefficients of the video block includes entropy encoding the quantized transform coefficients of the video block according to the refined probability distribution. The encoded video block is output to the bitstream.
- A decoder according to an implementation of this disclosure performs operations for decoding an encoded video block from a bitstream. The operations include using machine learning to refine a probability distribution for syntax elements representative of the encoded video block based on a set of features extracted from video data decoded from the bitstream. The syntax elements are decoded to produce a decoded video block in which decoding the syntax elements includes entropy decoding the syntax elements according to the refined probability distribution. The decoded video block is output to an output video stream.
- These and other aspects of this disclosure are disclosed in the following detailed description of the implementations, the appended claims and the accompanying figures.
- The description herein makes reference to the accompanying drawings described below, wherein like reference numerals refer to like parts throughout the several views.
-
FIG. 1 is a schematic of an example of a video encoding and decoding system. -
FIG. 2 is a block diagram of an example of a computing device that can implement a transmitting station or a receiving station. -
FIG. 3 is a diagram of an example of a video stream to be encoded and subsequently decoded. -
FIG. 4 is a block diagram of an example of an encoder according to implementations of this disclosure. -
FIG. 5 is a block diagram of an example of a decoder according to implementations of this disclosure. -
FIG. 6 is a block diagram of an example of an entropy coder that uses machine learning for encoding or decoding. -
FIG. 7 is a flowchart diagram of an example of a technique for entropy encoding quantized transform coefficients of a video block to a bitstream using machine learning. -
FIG. 8 is a flowchart diagram of an example of a technique for entropy decoding syntax elements representative of an encoded video block from a bitstream using machine learning. - Video compression schemes may include breaking respective images, or frames, of an input video stream 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 of bits required to encode video data to or decode video data from a bitstream. For example, entropy encoding may include using probability distributions of symbol values to encode to a bitstream, such as to reduce the amount of data that needs to be encoded. A decoder may then entropy decode the encoded symbols as syntax elements from the bitstream using those probability distributions.
- The probability values of a probability distribution indicate the likelihood that a particular symbol of video data (e.g., a quantized transform coefficient of a transform block) will have a particular value (e.g., 0 or 1 for binary cases or other values for non-binary cases). The probabilities of the probability distribution may be stored in the form of a cumulative density function where the probability of a first symbol value is p0, the probability of first two symbol values is p0 + p1, the probability of the first three symbol values is p0 + p1 + p2, and so on.
- The probability values of a probability distribution may be updated during encoding or decoding, such as based on observations of the symbol values to encode or decode. The probability distributions 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. In this way, the total number of bits required to code video data can be minimized.
- However, in some cases, it may be possible to refine a probability distribution using information related to the input video stream (e.g., during encoding) or bitstream (e.g., during decoding). That is, the probability distribution indicates the probabilities of the particular symbol values occurring within a symbol sequence or set to encode or decode, but without reference to other aspects of the input video stream or bitstream. For example, it may be possible to use other information from the encoding or decoding process, as applicable, to refine the probability distribution and, therefore, to improve the efficacy of entropy coding.
- Implementations of this disclosure address problems such as these by using machine learning to refine probability distributions of symbol values of video data prior to entropy coding the symbol values. During encoding, a probability distribution is determined for quantized transform coefficients of a video block, and a set of features is extracted from video data associated with the video block and/or one or more neighbor blocks of the video block. The probability distribution and the set of features are then processed using machine learning to produce a refined probability distribution. The quantized transform coefficients of the video block are entropy encoded according to the refined probability distribution to produce an encoded video block. The encoded video block is then output to an output video stream.
- During decoding, syntax elements representative of an encoded video block are derived from the bitstream. A probability distribution is determined for the syntax elements, and a set of features is extracted from video data decoded from the bitstream. The probability distribution and the set of features are then processed using machine learning to produce a refined probability distribution. The syntax elements are entropy decoded according to the refined probability distribution to produce quantized transform coefficients. The quantized transform coefficients are dequantized to produce transform coefficients. The transform coefficients are inverse transformed to produce a prediction residual. The prediction residual is reconstructed to produce a decoded video block. The decoded video block is then output to an output video stream.
- Further details of techniques for entropy coding in image and video compression using machine learning are described herein with initial reference to a system in which they can be implemented.
FIG. 1 is a schematic of an example of a video encoding anddecoding system 100. A transmittingstation 102 can be, for example, a computer having an internal configuration of hardware such as that described inFIG. 2 . However, other implementations of the transmittingstation 102 are possible. For example, the processing of the transmittingstation 102 can be distributed among multiple devices. - A
network 104 can connect the transmittingstation 102 and a receivingstation 106 for encoding and decoding of the video stream. Specifically, the video stream can be encoded in the transmittingstation 102, and the encoded video stream can be decoded in the receivingstation 106. Thenetwork 104 can be, for example, the Internet. Thenetwork 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 transmittingstation 102 to, in this example, the receivingstation 106. - The receiving
station 106, in one example, can be a computer having an internal configuration of hardware such as that described inFIG. 2 . However, other suitable implementations of the receivingstation 106 are possible. For example, the processing of the receivingstation 106 can be distributed among multiple devices. - Other implementations of the video encoding and
decoding system 100 are possible. For example, an implementation can omit thenetwork 104. In another implementation, a video stream can be encoded and then stored for transmission at a later time to the receivingstation 106 or any other device having memory. In one implementation, the receivingstation 106 receives (e.g., via thenetwork 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 thenetwork 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). - When used in a video conferencing system, for example, the transmitting
station 102 and/or the receivingstation 106 may include the ability to both encode and decode a video stream as described below. For example, the receivingstation 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. - 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 anddecoding 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 transmittingstation 102 may be used to encode the image data and the receivingstation 106 may be used to decode the image data. - 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 pre-encoded image data from the transmittingstation 102. As a further alternative, the transmittingstation 102 can represent a computing device that decodes the image data, such as prior to transmitting the decoded image data to the receivingstation 106 for display. -
FIG. 2 is a block diagram of an example of acomputing device 200 that can implement a transmitting station or a receiving station. For example, thecomputing device 200 can implement one or both of the transmittingstation 102 and the receivingstation 106 ofFIG. 1 . Thecomputing 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. - A
processor 202 in thecomputing device 200 can be a conventional central processing unit. Alternatively, theprocessor 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. - A
memory 204 incomputing 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 thememory 204. Thememory 204 can include code anddata 206 that is accessed by theprocessor 202 using abus 212. Thememory 204 can further include anoperating system 208 andapplication programs 210, theapplication programs 210 including at least one program that permits theprocessor 202 to perform the techniques described herein. For example, theapplication programs 210 can includeapplications 1 through N, which further include a video and/or image coding application that performs the techniques described herein. - The
computing device 200 can also include asecondary 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 thesecondary storage 214 and loaded into thememory 204 as needed for processing. - The
computing device 200 can also include one or more output devices, such as adisplay 218. Thedisplay 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. Thedisplay 218 can be coupled to theprocessor 202 via thebus 212. Other output devices that permit a user to program or otherwise use thecomputing device 200 can be provided in addition to or as an alternative to thedisplay 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. - The
computing device 200 can also include or be in communication with an image-sensingdevice 220, for example, a camera, or any other image-sensingdevice 220 now existing or hereafter developed that can sense an image such as the image of a user operating thecomputing device 200. The image-sensingdevice 220 can be positioned such that it is directed toward the user operating thecomputing device 200. In an example, the position and optical axis of the image-sensingdevice 220 can be configured such that the field of vision includes an area that is directly adjacent to thedisplay 218 and from which thedisplay 218 is visible. - The
computing device 200 can also include or be in communication with a sound-sensing device 222, for example, a microphone, or any other sound-sensing device now existing or hereafter developed that can sense sounds near thecomputing device 200. The sound-sensing device 222 can be positioned such that it is directed toward the user operating thecomputing device 200 and can be configured to receive sounds, for example, speech or other utterances, made by the user while the user operates thecomputing device 200. - Although
FIG. 2 depicts theprocessor 202 and thememory 204 of thecomputing device 200 as being integrated into one unit, other configurations can be utilized. The operations of theprocessor 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. Thememory 204 can be distributed across multiple machines such as a network-based memory or memory in multiple machines performing the operations of thecomputing device 200. - Although depicted here as one bus, the
bus 212 of thecomputing device 200 can be composed of multiple buses. Further, thesecondary storage 214 can be directly coupled to the other components of thecomputing 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. Thecomputing device 200 can thus be implemented in a wide variety of configurations. -
FIG. 3 is a diagram of an example of avideo stream 300 to be encoded and subsequently decoded. Thevideo stream 300 includes avideo sequence 302. At the next level, thevideo sequence 302 includes a number ofadjacent frames 304. While three frames are depicted as theadjacent frames 304, thevideo sequence 302 can include any number ofadjacent frames 304. Theadjacent frames 304 can then be further subdivided into individual frames, for example, aframe 306. - At the next level, the
frame 306 can be divided into a series of planes orsegments 308. Thesegments 308 can be subsets of frames that permit parallel processing, for example. Thesegments 308 can also be subsets of frames that can separate the video data into separate colors. For example, aframe 306 of color video data can include a luminance plane and two chrominance planes. Thesegments 308 may be sampled at different resolutions. - Whether or not the
frame 306 is divided intosegments 308, theframe 306 may be further subdivided intoblocks 310, which can contain data corresponding to, for example, 16x16 pixels in theframe 306. Theblocks 310 can also be arranged to include data from one ormore segments 308 of pixel data. Theblocks 310 can also be of any other suitable size such as 4x4 pixels, 8x8 pixels, 16x8 pixels, 8x16 pixels, 16x16 pixels, or larger. Unless otherwise noted, the terms block and macroblock are used interchangeably herein. -
FIG. 4 is a block diagram of an example of anencoder 400. Theencoder 400 can be implemented, as described above, in the transmittingstation 102, such as by providing a computer software program stored in memory, for example, thememory 204. The computer software program can include machine instructions that, when executed by a processor such as theprocessor 202, cause the transmittingstation 102 to encode video data in the manner described inFIG. 4 . Theencoder 400 can also be implemented as specialized hardware included in, for example, the transmittingstation 102. In one particularly desirable implementation, theencoder 400 is a hardware encoder. - 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 orcompressed bitstream 420 using thevideo stream 300 as input: an intra/inter prediction stage 402, atransform stage 404, aquantization stage 406, and anentropy encoding stage 408. Theencoder 400 may also include a reconstruction path (shown by the dotted connection lines) to reconstruct a frame for encoding of future blocks. InFIG. 4 , theencoder 400 has the following stages to perform the various functions in the reconstruction path: adequantization stage 410, aninverse transform stage 412, areconstruction stage 414, and aloop filtering stage 416. Other structural variations of theencoder 400 can be used to encode thevideo stream 300. - When the
video stream 300 is presented for encoding, respectiveadjacent frames 304, such as theframe 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 intra-prediction, a prediction block may be formed from samples in the current frame that have been previously encoded and reconstructed. In the case of inter-prediction, a prediction block may be formed from samples in one or more previously constructed reference frames. - 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). Thetransform stage 404 transforms the residual into transform coefficients in, for example, the frequency domain using block-based transforms. Thequantization 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. - 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 thecompressed bitstream 420. Thecompressed bitstream 420 can be formatted using various techniques, such as variable length coding (VLC) or arithmetic coding. Thecompressed bitstream 420 can also be referred to as an encoded video stream or encoded video bitstream, and the terms will be used interchangeably herein. - The reconstruction path (shown by the dotted connection lines) can be used to ensure that the
encoder 400 and a decoder 500 (described below with respect toFIG. 5 ) use the same reference frames to decode thecompressed bitstream 420. The reconstruction path performs functions that are similar to functions that take place during the decoding process (described below with respect toFIG. 5 ), including dequantizing the quantized transform coefficients at thedequantization stage 410 and inverse transforming the dequantized transform coefficients at theinverse transform stage 412 to produce a derivative residual block (also called a derivative residual). - 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. Theloop 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 include, without limitation: a deblocking filter as in H.264, VP9, HEVC, and AV1; a Constrained Directional Enhancement Filter as inAV 1; and a loop restoration filter as in AV1. - Other variations of the
encoder 400 can be used to encode thecompressed bitstream 420. In some implementations, a non-transform based encoder can quantize the residual signal directly without thetransform stage 404 for certain blocks or frames. In some implementations, an encoder can have thequantization stage 406 and thedequantization stage 410 combined in a common stage. -
FIG. 5 is a block diagram of an example of adecoder 500. Thedecoder 500 can be implemented in the receivingstation 106, for example, by providing a computer software program stored in thememory 204. The computer software program can include machine instructions that, when executed by a processor such as theprocessor 202, cause the receivingstation 106 to decode video data in the manner described inFIG. 5 . Thedecoder 500 can also be implemented in hardware included in, for example, the transmittingstation 102 or the receivingstation 106. - The
decoder 500, similar to the reconstruction path of theencoder 400 discussed above, includes in one example the following stages to perform various functions to produce anoutput video stream 516 from the compressed bitstream 420: anentropy decoding stage 502, adequantization stage 504, aninverse transform stage 506, an intra/inter prediction stage 508, areconstruction stage 510, aloop filtering stage 512, and apost filter stage 514. Other structural variations of thedecoder 500 can be used to decode thecompressed bitstream 420. - When the
compressed bitstream 420 is presented for decoding, the data elements within thecompressed bitstream 420 can be decoded by theentropy decoding stage 502 to produce a set of quantized transform coefficients. Thedequantization stage 504 dequantizes the quantized transform coefficients (e.g., by multiplying the quantized transform coefficients by the quantizer value), and theinverse transform stage 506 inverse transforms the dequantized transform coefficients to produce a derivative residual that can be identical to that created by theinverse transform stage 412 in theencoder 400. Using header information decoded from thecompressed bitstream 420, thedecoder 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). - At the
reconstruction stage 510, the prediction block can be added to the derivative residual to create a reconstructed block. Theloop filtering stage 512 can be applied to the reconstructed block to reduce blocking artifacts. Other filtering can be applied to the reconstructed block. In this example, thepost filter stage 514 is applied to the reconstructed block to reduce blocking distortion, and the result is output as theoutput video stream 516. Theoutput video stream 516 can also be referred to as a decoded video stream, and the terms will be used interchangeably herein. - Other variations of the
decoder 500 can be used to decode thecompressed bitstream 420. In some implementations, thedecoder 500 can produce theoutput video stream 516 without thepost filter stage 514. -
FIG. 6 is a block diagram of an example of anentropy coder 600 that uses machine learning for encoding or decoding. Theentropy coder 600 represents functionality for entropy coding video data, such as to or from a bitstream (e.g., thebitstream 420 shown inFIGS. 4 and5 ). For example, theentropy coder 600 can represent functionality for entropy encoding symbols to a bitstream, such as functionality performed at theentropy encoding stage 408 of theencoder 400 shown inFIG. 4 . In another example, theentropy coder 600 can represent functionality for entropy decoding symbols from a bitstream, such as functionality performed at theentropy decoding stage 502 shown inFIG. 5 . - Input received to the
entropy coder 600 includes aprobability distribution 602 and a set offeatures 604. Theprobability distribution 602 indicates probabilities for the possible values to be encoded to or to be decoded from a bitstream, as applicable. For example, where the values to be encoded or decoded represent binarized video data, theprobability distribution 602 can include a first probability for the value 0 and a second probability for thevalue 1. In another example, where the values to be encoded or decoded represent non-binary video data, theprobability distribution 602 can include N probabilities, where N is the number of different values which may be encoded or decoded. - The set of
features 604 includes video information related to the video block to entropy code using theentropy coder 600 and/or one or more neighbor blocks of that video block. In particular, the set offeatures 604 is identified based on one or more of video data associated with the video block, video data associated with one or more neighbor blocks of the video block, or coding modes used for encoding the one or more neighbor blocks. The features of the set offeatures 604 may, for example, correspond to differences in pixel values of the video block along one or more different directions, edges or pixel attributes for the video block, intra-prediction modes used for encoding the one or more neighbor blocks of the video block, local image textures within the video block and/or the one or more neighbor blocks of the video block, other video data, or a combination thereof. - The
machine learning stage 606 processes theprobability distribution 602 and the set offeatures 604 using machine learning to produce arefined probability distribution 608. Processing theprobability distribution 602 and the set offeatures 604 using machine learning includes applying a machine learning model to theprobability distribution 602 and the set offeatures 604 using machine learning. The machine learning model used by themachine learning stage 606 may, for example, be or include a neural network, a deep neural network, a support vector machine, a cluster network, a Bayesian network, a genetic algorithm, or another model. - The
refined probability distribution 608 is a distribution of probability values which have been updated based on the processing at themachine learning stage 606. Therefined probability distribution 608 can be produced by updating some or all of the probabilities of theprobability distribution 602. For example, therefined probability distribution 608 may include one or more probability values that is or are different from the respective probability value or values of theprobability distribution 602. - The
symbols 610 include one or more symbols, which may be commonly associated with a video aspect (e.g., a block of a video frame, a portion of a block, a segment or tile of a video frame, or another video aspect). Thesymbols 610 may represent binarized video data such that each symbol of thesymbols 610 has a value of 0 or 1. Alternatively, thesymbols 610 may represent non-binary video data such that each symbol of thesymbols 610 may have a value of 0, 1, 2, or 3, or may have another value. - The machine learning model is trained according to previous probability distributions and previous video data to recognize and process the
probability distribution 602 and the set offeatures 604. Themachine learning stage 606 functions to use a machine learning model (e.g., a neural network) that is trained to minimize cross-entropy loss between the symbols 610 (e.g., quantized transform coefficients, syntax elements, or other symbols) and therefined probability distribution 608 produced by themachine learning stage 606. - An
entropy coding stage 612 entropy codes thesymbols 610 according to therefined probability distribution 608. Entropy coding thesymbols 610 according to therefined probability distribution 608 can include arithmetic coding thesymbols 610 using refined values of therefined probability distribution 608. The arithmetic coding can be used to code each of thesymbols 610 based on the probability of thosesymbols 610 occurring in the video stream from which thesymbols 610 are encoded or in the bitstream to which the symbols are decoded. For example, ones of thesymbols 610 having higher probabilities can be arithmetic coded using smaller numbers of bits, whereas ones of thesymbols 610 having lower probabilities can be arithmetic coded using larger numbers of bits. In some cases, techniques other than arithmetic coding can be used by theentropy coding stage 612. - The arithmetic coding or other technique used by the
entropy coding stage 612 to reduce thesymbols 610 to one or more bits defines a compression throughput for theentropy coding stage 612 and, therefore, for theentropy coder 600. The compression throughput refers to the efficacy of theentropy coding stage 612 to minimize the number of bits used to represent thesymbols 610, either to a bitstream or from a bitstream. Thus, a compression throughput resulting from entropy coding the symbols 610 (e.g., quantized transform coefficients, syntax elements, or other video data) according to therefined probability distribution 608 is greater than a compression throughput resulting from entropy coding the symbols according to theprobability distribution 602. - In some implementations, the
probability distribution 602 may be used to update values stored in a probability table accessed by theentropy coder 600. For example, a probability table that stores values used to determine theprobability distribution 602 can be updated according to theprobability distribution 602, rather than therefined probability distribution 608. Updating the probability table includes changing one or more values stored in the probability table according to theprobability distribution 602 after thesymbols 610 are entropy coded according to therefined probability distribution 608 at theentropy coding stage 612. - Further details of techniques for entropy coding in image and video compression using machine learning are now described.
FIG. 7 is a flowchart diagram of an example of atechnique 700 for entropy encoding quantized transform coefficients of a video block to a bitstream using machine learning.FIG. 8 is a flowchart diagram of an example of atechnique 800 for entropy decoding syntax elements representative of an encoded video block from a bitstream using machine learning. - The
technique 700 and/or thetechnique 800 can be implemented, for example, as a software program that may be executed by computing devices such as the transmittingstation 102 or the receivingstation 106. For example, the software program can include machine-readable instructions that may be stored in a memory such as thememory 204 or thesecondary storage 214, and that, when executed by a processor, such as theprocessor 202, may cause the computing device to perform thetechnique 700 and/or thetechnique 800. Thetechnique 700 and/or thetechnique 800 can be implemented using specialized hardware or firmware. For example, a hardware component configured to perform thetechnique 700 and/or thetechnique 800. As explained above, some computing devices may have multiple memories or processors, and the operations described in thetechnique 700 and/or thetechnique 800 can be distributed using multiple processors, memories, or both. - For simplicity of explanation, the
technique 700 andtechnique 800 are both 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. - Referring first to
FIG. 7 , thetechnique 700 for entropy encoding quantized transform coefficients of a video block to a bitstream using machine learning is shown. At 702, a probability distribution for the quantized transform coefficients is determined. The quantized transform coefficients are coefficients of the video block after the video block is processed at prediction, transform, and quantization stages of an encoder, for example, the intra/inter prediction stage 402, thetransform stage 404, and thequantization stage 406 of theencoder 400 shown inFIG. 4 . The probability distribution for the quantized transform coefficients is a distribution of the probabilities for each possible value of the quantized transform coefficients. The probability distribution can be stored in and retrieved from a probability table. The probability values of the probability distribution may be stored in the form of a cumulative density function. - At 704, a set of features is extracted from video data associated with one or both of the video block or one or more neighbor blocks of the video block. In particular, the set of features is identified based on one or more of video data associated with the video block, video data associated with one or more neighbor blocks of the video block, or coding modes used for encoding the one or more neighbor blocks. The features of the set of features may, for example, correspond to differences in pixel values of the video block along one or more different directions, edges or pixel attributes for the video block, intra-prediction modes used for encoding the one or more neighbor blocks of the video block, local image textures within the video block and/or the one or more neighbor blocks of the video block, other video data, or a combination thereof.
- At 706, the probability distribution and the set of features are processed using machine learning to produce a refined probability distribution. Using the machine learning to produce the refined probability distribution includes feeding the probability distribution and the set of features into a machine learning model. The machine learning model is a machine learning aspect which has been trained according to previous probability distributions and previous video data to recognize and process the probability distribution and the set of features. In particular, the machine learning model is trained to process information identified, produced, selected, or otherwise determined using the probability distribution and the set of features.
- The set of features extracted from the video data may, for example, correspond to differences in pixel values of the video block. For example, those pixel values may pertain to already reconstructed portions of the block context for the video block. A histogram of oriented gradients (e.g., a normalized histogram of oriented gradients) can be computed based on different directions of the differences in those pixel values. The machine learning model can be used to process the histogram of oriented gradients (i.e., the set of features may include a histogram of oriented gradients). In some implementations, the set of features includes a different type of feature descriptor instead of or in addition to the histogram of oriented gradients, for example, an edge orientation histogram, a scale-invariant feature transform descriptor, or a shape context.
- The refined probability distribution can then be produced by updating the probability distribution based on the normalized histogram of oriented gradients. For example, the machine learning model trained using the previous probability distributions and previous video data can be trained to determine probabilities of different directions of the pixel differences based on the normalized histogram of oriented gradients. The machine learning model can then cause those probabilities to be used to update the probability distribution.
- In some cases, such as where the probabilities of the different directions of the pixel differences do not meet a threshold (e.g., because those probabilities are too low), updating the probability distribution based on the normalized histogram of oriented gradients can include discarding the probabilities of the different directions of the pixel differences. In such a case, the refined probability distribution can be the probability distribution as originally received from the probability table.
- In some implementations, the machine learning model can be used to process directions of intra-prediction modes used to encode one or more neighbor blocks of the video block. The set of features from the video data may, for example, correspond to different directions of those intra-prediction modes used for encoding the neighbor blocks. The machine learning model can process the different directions of the intra-prediction modes used for encoding the neighbor blocks to determine probabilities of prediction directions for the quantized transform coefficients of the video block. The refined probability distribution can then be produced by updating the probability distribution based on the probabilities of the prediction directions.
- In some cases, such as where the probabilities of the prediction directions of the quantized transform coefficients do not meet a threshold (e.g., because those probabilities are too low), updating the probability distribution based on the probabilities of the prediction directions can include discarding the probabilities of the prediction directions. In such a case, the refined probability distribution can be the probability distribution as originally received from the probability table.
- The foregoing represents ways in which the probability distribution and the set of features can be processed using machine learning to produce a refined probability model. A machine learning model can be used to process other video data, such as video data from the video block, video data from one or more neighbor blocks of the video block, video data from other aspects of the input video stream, or a combination thereof.
- At 708, the quantized transform coefficients of the video block are entropy encoded according to the refined probability distribution. Entropy encoding the quantized transform coefficients according to the refined probability distribution includes using an entropy encoding technique, for example, arithmetic coding, to determine numbers of bits to use to encode the quantized transform coefficients based on the probabilities of the refined probability distribution, so as to minimize the number of bits required to signal the quantized transform coefficients within a bitstream. At 710, the encoded video block is output to the bitstream.
- In some implementations, the
technique 700 may include updating the probability distribution after entropy encoding the quantized transform coefficients. For example, a probability table that stores values used to determine the probability distribution can be updated according to the probability distribution, rather than the refined probability distribution. For example, the probability distribution can be used to update the values stored in the probability table on a symbol-by-symbol basis such that the probabilities of the probability distribution are updated after processing individual ones of the symbols. Updating the probability table includes changing one or more values stored in the probability table according to the probability distribution for the quantized transform coefficients. - Referring next to
FIG. 8 , thetechnique 800 for entropy decoding syntax elements representative of an encoded video block from a bitstream using machine learning is shown. At 802, the syntax elements are derived from the bitstream. Deriving the syntax elements can include decoding a portion of the bitstream corresponding to the encoded video block, a portion of the bitstream corresponding to an encoded video frame that includes the encoded video block, or another portion of the bitstream. - At 804, a probability distribution for the syntax elements is determined. Determining the probability distribution can include retrieving values from a probability table. For example, the probability table may be a table or other data store which stores values used to determine the probability distribution. The values may be probability values of a cumulative density function. The probability table may be a table accessible to a decoder used to entropy decode the syntax elements from the bitstream.
- At 806, a set of features is extracted from video data decoded from the bitstream. The set of features can be features from the encoded video block and/or from one or more neighbor blocks of the encoded video block. As such, extracting the set of features can include identifying the set of features based on one or more of video data associated with the encoded video block, video data associated with one or more neighbor blocks of the encoded video block, or coding modes used for decoding the one or more neighbor blocks.
- At 808, the probability distribution and the set of features are processed using machine learning to produce a refined probability distribution. Using the machine learning to produce the refined probability distribution includes feeding the probability distribution and the set of features into a machine learning model. The machine learning model is a machine learning aspect which has been trained according to previous probability distributions and previous video data to recognize and process the probability distribution and the set of features. In particular, the machine learning model is trained to process information identified, produced, selected, or otherwise determined using the probability distribution and the set of features.
- For example, the machine learning model can be used to process a normalized histogram of oriented gradients. The set of features extracted from the video data may, for example, correspond to differences in pixel values of the encoded video block. For example, those pixel values may pertain to already reconstructed portions of the block context for the encoded video block. The normalized histogram of oriented gradients can be computed based on different directions of the differences in those pixel values.
- The refined probability distribution can then be produced by updating the probability distribution based on the normalized histogram of oriented gradients. For example, the machine learning model trained using the previous probability distributions and previous video data can be trained to determine probabilities of different directions of the pixel differences based on the normalized histogram of oriented gradients. The machine learning model can then cause those probabilities to be used to update the probability distribution.
- In some cases, such as where the probabilities of the different directions of the pixel differences do not meet a threshold (e.g., because those probabilities are too low), updating the probability distribution based on the normalized histogram of oriented gradients can include discarding the probabilities of the different directions of the pixel differences. In such a case, the refined probability distribution can be the probability distribution as originally received from the probability table.
- In some implementations, the machine learning model can be used to process directions of intra-prediction modes used to decode one or more neighbor blocks of the encoded video block. The set of features from the video data may, for example, correspond to different directions of those intra-prediction modes used for decoding the neighbor blocks. The machine learning model can process the different directions of the intra-prediction modes used for decoding the neighbor blocks to determine probabilities of prediction directions for the syntax elements of the encoded video block. The refined probability distribution can then be produced by updating the probability distribution based on the probabilities of the prediction directions.
- In some cases, such as where the probabilities of the prediction directions of the syntax elements do not meet a threshold (e.g., because those probabilities are too low), updating the probability distribution based on the probabilities of the prediction directions can include discarding the probabilities of the prediction directions. In such a case, the refined probability distribution can be the probability distribution as originally received from the probability table.
- The foregoing represents ways in which the probability distribution and the set of features can be processed using machine learning to produce a refined probability model. A machine learning model can be used to process other video data, such as video data from the encoded video block, video data from one or more neighbor blocks of the encoded video block, video data from other aspects of the bitstream, or a combination thereof.
- At 810, the syntax elements representative of the encoded video block are entropy decoded according to the refined probability distribution. Entropy decoding the syntax elements according to the refined probability distribution includes using an entropy decoding technique, for example, arithmetic coding, to determine symbols that correspond to each of the syntax elements based on the probabilities of the refined probability distribution.
- At 812, the quantized transform coefficients are further decoded to produce a decoded video block. Further decoding the quantized transform coefficients includes dequantizing the quantized transform coefficients to produce transform coefficients, inverse transforming the transform coefficients to produce a prediction residual, and reconstructing the prediction residual to produce the decoded video block. For example, the further decoding can be performed at the
dequantization stage 504, theinverse transform stage 506, the intra/inter prediction stage 508, and thereconstruction stage 510 of thedecoder 500 shown inFIG. 5 . At 814, the decoded video block is output to an output video stream. - In some implementations, the
technique 800 may include updating the probability distribution after entropy decoding the syntax elements. For example, a probability table that stores values used to determine the probability distribution can be updated according to the probability distribution, rather than the refined probability distribution. For example, the probability distribution can be used to update the values stored in the probability table on a symbol-by-symbol basis such that the probabilities of the probability distribution are updated after processing individual ones of the symbols. Updating the probability table includes changing one or more values stored in the probability table according to the probability distribution for the syntax elements. - The aspects of encoding and decoding described above illustrate some examples of encoding and decoding techniques. However, it is to be understood that encoding and decoding, as those terms are used in the claims, could mean compression, decompression, transformation, or any other processing or change of data.
- The word "example" is used herein to mean serving as an example, instance, or illustration. Any aspect or design described herein as "example" is not necessarily to be construed as 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.
- 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 theencoder 400 and the decoder 500) 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 transmittingstation 102 and the receivingstation 106 do not necessarily have to be implemented in the same manner. - Further, in one aspect, for example, the transmitting
station 102 or the receivingstation 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 hardware for carrying out any of the methods, algorithms, or instructions described herein. - The transmitting
station 102 and the receivingstation 106 can, for example, be implemented on computers in a video conferencing system. Alternatively, the transmittingstation 102 can be implemented on a server, and the receivingstation 106 can be implemented on a device separate from the server, such as a handheld communications device. In this instance, the transmittingstation 102, using anencoder 400, 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 using adecoder 500. Alternatively, the communications device can decode content stored locally on the communications device, for example, content that was not transmitted by the transmittingstation 102. Other suitable transmitting and receiving implementation schemes are available. For example, the receivingstation 106 can be a generally stationary personal computer rather than a portable communications device, and/or a device including anencoder 400 may also include adecoder 500. - 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.
- The above-described implementations and other aspects have been described in order 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 so as to encompass all such modifications and equivalent arrangements.
Aspects and embodiments of the present disclosure may be as set out in the following numbered clauses. -
Clause 1. A method for decoding an encoded video block from a bitstream, the method comprising: - deriving syntax elements representative of the encoded video block from the bitstream;
- determining a probability distribution for the syntax elements;
- extracting a set of features from video data decoded from the bitstream;
- processing the probability distribution and the set of features using machine learning to produce a refined probability distribution;
- entropy decoding the syntax elements according to the refined probability distribution to produce quantized transform coefficients;
- dequantizing the quantized transform coefficients to produce transform coefficients;
- inverse transforming the transform coefficients to produce a prediction residual;
- reconstructing the prediction residual to produce a decoded video block; and
- outputting the decoded video block to an output video stream.
- Clause 2. The method of
clause 1, wherein a compression throughput resulting from entropy decoding the syntax elements according to the refined probability distribution is greater than a compression throughput resulting from entropy decoding the syntax elements according to the probability distribution. - Clause 3. The method of
clause 1 or 2, wherein extracting the set of features from video data decoded from the bitstream comprises:
identifying the set of features based on one or more of video data associated with the encoded video block, video data associated with one or more neighbor blocks of the encoded video block, or coding modes used for decoding the one or more neighbor blocks. - Clause 4. The method of clause 3, wherein the set of features corresponds to differences in pixel values of the encoded video block along one or more different directions, and processing the probability distribution and the set of features using machine learning to produce the refined probability distribution comprises:
- computing a normalized histogram of oriented gradients based on the one or more different directions of the differences in pixel values; and
- producing the refined probability distribution by updating the probability distribution based on the normalized histogram of oriented gradients.
- Clause 5. The method of clause 3, wherein the set of features corresponds to intra-prediction modes used for decoding the one or more neighbor blocks, and processing the probability distribution and the set of features using machine learning to produce the refined probability distribution comprises:
- determining probabilities of prediction directions for the syntax elements based on directions of the intra-prediction modes; and
- producing the refined probability distribution by updating the probability distribution based on the probabilities of the prediction directions.
- Clause 6. The method of any of
clauses 1 to 5, wherein the probability distribution is determined based on values stored in a probability table, the method further comprising:
updating the values stored in the probability table according to the probability distribution for the syntax elements. - Clause 7. The method of any of
clauses 1 to 5, wherein the machine learning uses a neural network that is trained to minimize cross-entropy loss between the syntax elements and the refined probability distribution. - Clause 8. An apparatus for decoding an encoded video block from a bitstream, the apparatus comprising:
a processor configured to: - determine a probability distribution for syntax elements representative of the encoded video block, the syntax elements derived from the bitstream;
- identify a set of features based on one or more of video data associated with the encoded video block, video data associated with one or more neighbor blocks of the encoded video block, or coding modes used for decoding the one or more neighbor blocks;
- process the probability distribution and the set of features using machine learning to produce a refined probability distribution;
- entropy decode the syntax elements according to the refined probability distribution to produce quantized transform coefficients;
- further decode the quantized transform coefficients to produce a decoded video block; and
- output the decoded video block to an output video stream.
- Clause 9. The apparatus of clause 8, wherein a compression throughput resulting from entropy decoding the syntax elements according to the refined probability distribution is greater than a compression throughput resulting from entropy decoding the syntax elements according to the probability distribution.
- Clause 10. The apparatus of clause 8 or 9, wherein the processor is configured to identify the set of features based on the one or more of the video data associated with the encoded video block, the video data associated with the one or more neighbor blocks of the encoded video block, or the coding modes used for decoding the one or more neighbor blocks by:
extracting the one or more of the video data associated with the encoded video block, the video data associated with the one or more neighbor blocks of the encoded video block, or the coding modes used for decoding the one or more neighbor blocks from the bitstream. - Clause 11. The apparatus of clause 10, wherein the set of features corresponds to differences in pixel values of the encoded video block along one or more different directions, and the processor is configured to process the probability distribution and the set of features using machine learning to produce the refined probability distribution by:
- computing a normalized histogram of oriented gradients based on the one or more different directions of the differences in pixel values; and
- producing the refined probability distribution by updating the probability distribution based on the normalized histogram of oriented gradients.
- Clause 12. The apparatus of clause 10, wherein the set of features corresponds to intra-prediction modes used for decoding the one or more neighbor blocks, and the processor is configured to process the probability distribution and the set of features using machine learning to produce the refined probability distribution by:
- determining probabilities of prediction directions for the syntax elements based on directions of the intra-prediction modes; and
- producing the refined probability distribution by updating the probability distribution based on the probabilities of the prediction directions.
- Clause 13. The apparatus of any of clauses 8 to 12, wherein the probability distribution is determined based on values stored in a probability table, and the processor is configured to:
update the values stored in the probability table according to the probability distribution for the syntax elements. - Clause 14. The apparatus of any of clauses 8 to 13, wherein the machine learning uses a neural network that is trained to minimize cross-entropy loss between the syntax elements and the refined probability distribution.
- Clause 15. The apparatus of any of clauses 8 to 14, wherein the apparatus is implemented by the processor executing instructions stored in a memory.
- Clause 16. A decoder that performs operations for decoding an encoded video block from a bitstream, the operations comprising:
- using machine learning to refine a probability distribution for syntax elements representative of the encoded video block based on a set of features extracted from video data decoded from the bitstream;
- decoding the syntax elements to produce a decoded video block, wherein decoding the syntax elements includes entropy decoding the syntax elements according to the refined probability distribution; and
- outputting the decoded video block to an output video stream.
- Clause 17. The decoder of clause 16, wherein a compression throughput resulting from entropy decoding the syntax elements according to the refined probability distribution is greater than a compression throughput resulting from entropy decoding the syntax elements according to the probability distribution.
- Clause 18. The decoder of clause 16 or 17, wherein the probability distribution is determined based on values stored in a probability table, and the decoder performs operations for updating the values stored in the probability table after entropy decoding the syntax elements according to the refined probability distribution.
- Clause 19. The decoder of any of clauses 16 to 18, wherein the set of features relates to one or more of video data associated with the encoded video block, video data associated with one or more neighbor blocks of the encoded video block, or coding modes used for decoding the one or more neighbor blocks.
- Clause 20. The decoder of any of clauses 16 to 19, wherein the set of features corresponds to differences in pixel values of the encoded video block along one or more different directions, and wherein using machine learning to refine the probability distribution for the syntax elements representative of the encoded video block based on the set of features extracted from video data decoded from the bitstream comprises:
- computing a normalized histogram of oriented gradients based on the one or more different directions of the differences in pixel values; and
- producing the refined probability distribution by updating the probability distribution based on the normalized histogram of oriented gradients.
- Clause 21. The decoder of any of clauses 16 to 19, wherein the set of features corresponds to intra-prediction modes used for decoding one or more neighbor blocks of the encoded video block, and wherein using machine learning to refine the probability distribution for the syntax elements representative of the encoded video block based on the set of features extracted from video data decoded from the bitstream comprises:
- determining probabilities of prediction directions for the syntax elements based on directions of the intra-prediction modes; and
- producing the refined probability distribution by updating the probability distribution based on the probabilities of the prediction directions.
Claims (15)
- A method for decoding an encoded video block from a bitstream, the method comprising:deriving syntax elements representative of the encoded video block from the bitstream;determining a probability distribution for the syntax elements;identifying, based on one or both of the syntax elements or other video data associated with the encoded video block, intra-prediction modes used for decoding one or more neighbor blocks of the encoded video block;determining probabilities of prediction directions for the syntax elements based on directions of the intra-prediction modes;producing a refined probability distribution by updating the probability distribution based on the probabilities of the prediction directions;entropy decoding the syntax elements according to the refined probability distribution to produce quantized transform coefficients;dequantizing the quantized transform coefficients to produce transform coefficients;inverse transforming the transform coefficients to produce a prediction residual;reconstructing the prediction residual to produce a decoded video block; andoutputting the decoded video block to an output video stream.
- The method of claim 1, wherein a compression throughput resulting from entropy decoding the syntax elements according to the refined probability distribution is greater than a compression throughput resulting from entropy decoding the syntax elements according to the probability distribution.
- The method of claim 1, wherein identifying the intra-prediction modes used for decoding the one or more neighbor blocks of the encoded video block comprises:
extracting the other video data associated with the encoded video block from the bitstream. - The method of claim 1, wherein producing the refined probability distribution by updating the probability distribution based on the probabilities of the prediction directions comprises:determining whether the probabilities of the prediction directions meet a threshold; andresponsive to determining that the probabilities of the prediction directions do not meet the threshold, discarding the probabilities of the prediction directions and using the probability distribution as the refined probability distribution.
- The method of any of claims 1-4, wherein entropy decoding the syntax elements according to the refined probability distribution to produce quantized transform coefficients comprises:
arithmetic coding symbols representative of the syntax elements using refined values of the refined probability distribution. - The method of any of claims 1-4, wherein the probability distribution is determined based on values stored in a probability table, the method further comprising:
updating the values stored in the probability table according to the probability distribution for the syntax elements. - The method of any of claims 1-4, wherein one or both of determining the probabilities of the prediction directions or producing the refined probability distribution includes using machine learning, wherein the machine learning uses a neural network that is trained to minimize cross-entropy loss between the syntax elements and the refined probability distribution.
- An apparatus for decoding an encoded video block from a bitstream, the apparatus comprising:a memory; anda processor configured to execute instructions stored in the memory to:determine a probability distribution for syntax elements representative of the encoded video block, the syntax elements derived from the bitstream;identify, based on one or both of the syntax elements or other video data associated with the encoded video block, intra-prediction modes used for decoding one or more neighbor blocks of the encoded video block;process the probability distribution and the intra-prediction modes using machine learning to produce a refined probability distribution, including by:determining probabilities of prediction directions for the syntax elements based on directions of the intra-prediction modes; andupdating the probability distribution based on the probabilities of the prediction directions;entropy decode the syntax elements according to the refined probability distribution to produce quantized transform coefficients;further decode the quantized transform coefficients to produce a decoded video block; andoutput the decoded video block to an output video stream.
- The apparatus of claim 8, wherein a compression throughput resulting from entropy decoding the syntax elements according to the refined probability distribution is greater than a compression throughput resulting from entropy decoding the syntax elements according to the probability distribution.
- The apparatus of claim 8, wherein the instructions to identify the intra-prediction modes used for decoding the one or more neighbor blocks of the encoded video block include instructions to:
extract the other video data associated with the encoded video block from the bitstream. - The apparatus of claim 8, wherein the instructions to update the probability distribution based on the probabilities of the prediction directions include instructions to:determine whether the probabilities of the prediction directions meet a threshold; andresponsive to a determination that the probabilities of the prediction directions do not meet the threshold, discard the probabilities of the prediction directions and use the probability distribution as the refined probability distribution.
- The apparatus of any of claims 8-11, wherein the instructions to entropy decode the syntax elements according to the refined probability distribution to produce quantized transform coefficients include instructions to:
arithmetic code symbols representative of the syntax elements using refined values of the refined probability distribution. - The apparatus of any of claims 8-11, wherein the probability distribution is determined based on values stored in a probability table, wherein the instructions include instructions to:
updating the values stored in the probability table according to the probability distribution for the syntax elements. - The apparatus of any of claims 8-11, wherein the machine learning uses a neural network that is trained to minimize cross-entropy loss between the syntax elements and the refined probability distribution.
- A decoder that performs operations for decoding according to any of claims 1-14.
Applications Claiming Priority (3)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| US16/287,889 US10652581B1 (en) | 2019-02-27 | 2019-02-27 | Entropy coding in image and video compression using machine learning |
| EP19813695.4A EP3932055B1 (en) | 2019-02-27 | 2019-10-31 | Improved entropy coding in image and video decompression using machine learning |
| PCT/US2019/059035 WO2020176144A1 (en) | 2019-02-27 | 2019-10-31 | Improved entropy coding in image and video compression using machine learning |
Related Parent Applications (2)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| EP19813695.4A Division EP3932055B1 (en) | 2019-02-27 | 2019-10-31 | Improved entropy coding in image and video decompression using machine learning |
| EP19813695.4A Division-Into EP3932055B1 (en) | 2019-02-27 | 2019-10-31 | Improved entropy coding in image and video decompression using machine learning |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| EP4436176A2 true EP4436176A2 (en) | 2024-09-25 |
| EP4436176A3 EP4436176A3 (en) | 2024-10-23 |
Family
ID=68766843
Family Applications (2)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| EP19813695.4A Active EP3932055B1 (en) | 2019-02-27 | 2019-10-31 | Improved entropy coding in image and video decompression using machine learning |
| EP24182040.6A Pending EP4436176A3 (en) | 2019-02-27 | 2019-10-31 | Improved entropy coding in image and video decompression using machine learning |
Family Applications Before (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| EP19813695.4A Active EP3932055B1 (en) | 2019-02-27 | 2019-10-31 | Improved entropy coding in image and video decompression using machine learning |
Country Status (4)
| Country | Link |
|---|---|
| US (2) | US10652581B1 (en) |
| EP (2) | EP3932055B1 (en) |
| CN (2) | CN113287306B (en) |
| WO (1) | WO2020176144A1 (en) |
Families Citing this family (22)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| EP3562162A1 (en) * | 2018-04-27 | 2019-10-30 | InterDigital VC Holdings, Inc. | Method and apparatus for video encoding and decoding based on neural network implementation of cabac |
| US12549765B2 (en) * | 2019-06-25 | 2026-02-10 | Electronics And Telecommunications Research Institute | Image encoding/decoding method and apparatus |
| US11496769B2 (en) * | 2019-09-27 | 2022-11-08 | Apple Inc. | Neural network based image set compression |
| US11051013B2 (en) * | 2019-11-12 | 2021-06-29 | Realtek Semiconductor Corp. | Device and method of selecting an intra mode of a coding unit |
| WO2021255567A1 (en) * | 2020-06-16 | 2021-12-23 | Nokia Technologies Oy | Guided probability model for compressed representation of neural networks |
| US12155849B2 (en) | 2020-06-25 | 2024-11-26 | Telefonaktiebolaget Lm Ericsson (Publ) | Method and system for image compressing and coding with deep learning |
| CN113949867B (en) * | 2020-07-16 | 2023-06-20 | 武汉Tcl集团工业研究院有限公司 | Method and device for image processing |
| CN114339262B (en) * | 2020-09-30 | 2023-02-14 | 华为技术有限公司 | Entropy encoding/decoding method and device |
| US11611770B2 (en) * | 2020-10-14 | 2023-03-21 | Tencent America LLC | Method and apparatus for video coding |
| JP7665776B2 (en) * | 2021-03-26 | 2025-04-21 | ドルビー ラボラトリーズ ライセンシング コーポレイション | Multidistribution Entropy Modeling of Latency Features in Image and Video Coding Using Neural Networks |
| CN115442609A (en) * | 2021-06-02 | 2022-12-06 | 华为技术有限公司 | Feature data encoding and decoding method and device |
| CN115604486B (en) * | 2021-07-09 | 2025-09-12 | 华为技术有限公司 | Video image encoding and decoding method and device |
| EP4476914A1 (en) | 2022-02-11 | 2024-12-18 | Qualcomm Incorporated | Neural-network media compression using quantized entropy coding distribution parameters |
| US12323634B2 (en) * | 2022-02-11 | 2025-06-03 | Qualcomm Incorporated | Entropy coding for neural-based media compression |
| CN116778003A (en) * | 2022-03-10 | 2023-09-19 | 华为技术有限公司 | A method and device for feature map encoding and feature map decoding |
| CN117412046A (en) * | 2022-07-08 | 2024-01-16 | 华为技术有限公司 | A coding and decoding method, device and computer equipment |
| CN115604490B (en) * | 2022-09-30 | 2025-12-30 | 中国科学技术大学 | A semantically structured image encoding and decoding method and system based on block masks |
| US12501050B2 (en) | 2023-03-09 | 2025-12-16 | Qualcomm Incorporated | Efficient warping-based neural video codec |
| CN118694982A (en) * | 2023-03-22 | 2024-09-24 | 华为技术有限公司 | Feature map encoding method and device |
| US20250286919A1 (en) * | 2024-03-11 | 2025-09-11 | Super Hi-Fi, Llc | Systems and Methods for Media Content Streaming |
| CN121286016A (en) * | 2024-04-16 | 2026-01-06 | 北京小米移动软件有限公司 | Method and apparatus with entropy continuation for entropy encoding and decoding in L3C2 Lidar point cloud encoding and decoding |
| WO2026001914A1 (en) * | 2024-06-25 | 2026-01-02 | Zhejiang Dahua Technology Co., Ltd. | Video encoding and decoding methods |
Family Cites Families (7)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN100596198C (en) * | 2006-12-05 | 2010-03-24 | 华为技术有限公司 | A kind of encoding method and encoder |
| CN107529709B (en) * | 2011-06-16 | 2019-05-07 | Ge视频压缩有限责任公司 | Decoder, encoder, method of decoding and encoding video, and storage medium |
| US9774856B1 (en) * | 2012-07-02 | 2017-09-26 | Google Inc. | Adaptive stochastic entropy coding |
| US10573018B2 (en) * | 2016-07-13 | 2020-02-25 | Intel Corporation | Three dimensional scene reconstruction based on contextual analysis |
| EP3545679B1 (en) * | 2016-12-02 | 2022-08-24 | Huawei Technologies Co., Ltd. | Apparatus and method for encoding an image |
| KR102535361B1 (en) * | 2017-10-19 | 2023-05-24 | 삼성전자주식회사 | Image encoder using machine learning and data processing method thereof |
| EP3562162A1 (en) | 2018-04-27 | 2019-10-30 | InterDigital VC Holdings, Inc. | Method and apparatus for video encoding and decoding based on neural network implementation of cabac |
-
2019
- 2019-02-27 US US16/287,889 patent/US10652581B1/en active Active
- 2019-10-31 WO PCT/US2019/059035 patent/WO2020176144A1/en not_active Ceased
- 2019-10-31 EP EP19813695.4A patent/EP3932055B1/en active Active
- 2019-10-31 EP EP24182040.6A patent/EP4436176A3/en active Pending
- 2019-10-31 CN CN201980087947.1A patent/CN113287306B/en active Active
- 2019-10-31 CN CN202410672751.1A patent/CN118694943A/en active Pending
-
2020
- 2020-04-02 US US16/838,539 patent/US11259053B2/en active Active
Also Published As
| Publication number | Publication date |
|---|---|
| EP4436176A3 (en) | 2024-10-23 |
| US10652581B1 (en) | 2020-05-12 |
| CN118694943A (en) | 2024-09-24 |
| US11259053B2 (en) | 2022-02-22 |
| CN113287306A (en) | 2021-08-20 |
| WO2020176144A1 (en) | 2020-09-03 |
| US20200275130A1 (en) | 2020-08-27 |
| EP3932055A1 (en) | 2022-01-05 |
| EP3932055B1 (en) | 2024-07-17 |
| CN113287306B (en) | 2024-06-18 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US11259053B2 (en) | Entropy coding in image and video compression using machine learning | |
| US12047606B2 (en) | Transform kernel selection and entropy coding | |
| US11102477B2 (en) | DC coefficient sign coding scheme | |
| AU2016389089B2 (en) | Motion vector prediction using prior frame residual | |
| EP4454139A1 (en) | Regularization of a probability model for entropy coding | |
| EP4454271A1 (en) | Time-variant multi-hypothesis probability model update for entropy coding | |
| EP4546778A2 (en) | Compound motion-compensated prediction | |
| US10491923B2 (en) | Directional deblocking filter | |
| US11051018B2 (en) | Transforms for large video and image blocks | |
| WO2024020117A1 (en) | Dependent context model for transform types | |
| WO2024020119A1 (en) | Bit stream syntax for partition types | |
| WO2024107210A1 (en) | Dc only transform coefficient mode for image and video coding | |
| EP4699307A1 (en) | Extended palette coding |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| PUAI | Public reference made under article 153(3) epc to a published international application that has entered the european phase |
Free format text: ORIGINAL CODE: 0009012 |
|
| STAA | Information on the status of an ep patent application or granted ep patent |
Free format text: STATUS: REQUEST FOR EXAMINATION WAS MADE |
|
| REG | Reference to a national code |
Ref country code: DE Ref legal event code: R079 Free format text: PREVIOUS MAIN CLASS: H04N0019593000 Ipc: H04N0019110000 |
|
| PUAL | Search report despatched |
Free format text: ORIGINAL CODE: 0009013 |
|
| 17P | Request for examination filed |
Effective date: 20240613 |
|
| AC | Divisional application: reference to earlier application |
Ref document number: 3932055 Country of ref document: EP Kind code of ref document: P |
|
| AK | Designated contracting states |
Kind code of ref document: A2 Designated state(s): AL AT BE BG CH CY CZ DE DK EE ES FI FR GB GR HR HU IE IS IT LI LT LU LV MC MK MT NL NO PL PT RO RS SE SI SK SM TR |
|
| AK | Designated contracting states |
Kind code of ref document: A3 Designated state(s): AL AT BE BG CH CY CZ DE DK EE ES FI FR GB GR HR HU IE IS IT LI LT LU LV MC MK MT NL NO PL PT RO RS SE SI SK SM TR |
|
| RIC1 | Information provided on ipc code assigned before grant |
Ipc: H04N 19/593 20140101ALI20240913BHEP Ipc: H04N 19/194 20140101ALI20240913BHEP Ipc: H04N 19/176 20140101ALI20240913BHEP Ipc: H04N 19/157 20140101ALI20240913BHEP Ipc: H04N 19/14 20140101ALI20240913BHEP Ipc: H04N 19/13 20140101ALI20240913BHEP Ipc: H04N 19/11 20140101AFI20240913BHEP |