Systems and methods for improved entropy coding efficiency
View Patent ↗Systems and methods for an entropy coding system are described. The entropy coding systems include an encoding apparatus and a decoding apparatus. The encoding apparatus is configured to receive an original input stream comprising a plurality of symbols having a known entropy characteristic according to a probability distribution of each of the symbols appearing in the original input stream, determine an input and respective state for each symbol read from the original input stream, append the determined input to the encoded output stream, and provided the encoded output stream to the decoding apparatus. The decoding apparatus is configured to receive the encoded output stream, process the encoded output stream, and for each read input: determine an output symbol and a respective output, persist the respective output state to the encoded output stream, and append the determined output symbol to the results output stream.
1 . A method for entropy coding, comprising:
receiving an input stream comprising a plurality of symbols having a known entropy characteristic according to a probability distribution of each of the plurality of symbols appearing in the input stream;
determining a respective set of pairs for a next symbol of the input stream read in a reverse order, wherein each pair includes a respective input and a respective state corresponding to the next symbol in a mapping table configured to map each symbol of an alphabet of symbols to the respective set of pairs, wherein a respective number of pairs in the respective set of pairs is based on the probability distribution;
selecting one pair from the determined respective set of pairs based on a last input appended to an encoded output stream;
removing from the encoded output stream a set of bits matching the respective state of the selected one pair;
appending the respective input of the selected one pair to the encoded output stream; and
transmitting the encoded output stream to a decoding module for processing.
2 . The method for entropy coding according to claim 1 , further comprising repeating the determining, selecting, removing, and appending steps until all symbols of the input stream are encoded into the encoded output stream.
3 . The method for entropy coding according to claim 1 ,
wherein the mapping table represents a bijective function configured to map the alphabet of symbols to a plurality of paired inputs and states; and
wherein each state in the mapping table is distinct from any other state in the mapping table.
4 . The method for entropy coding according to claim 1 ,
wherein each state is determined based on last k bits of the respective input, and
wherein k is determined, for each of the plurality of symbols, according to the respective number of pairs.
5 . The method for entropy coding according to claim 1 ,
wherein each input and state pair is unique in the mapping table, and/or
wherein the probability distribution of each of the plurality of symbols appearing in the input stream is not based on powers of the number two.
6 . A non-transitory computer-readable medium storing instructions that, when executed by an electronic processor, cause the electronic processor to perform operations comprising the method according to claim 1 .
7 . An encoding apparatus configured to perform the method of claim 1 .
8 . A method for entropy coding, comprising:
receiving an encoded input stream comprising an encoding of a plurality of symbols having a known entropy characteristic according to a probability distribution of each of the symbols appearing in the input stream;
processing the input stream by sequentially reading a fixed number of bits from the encoded input stream or from the encoded input stream and a state data store as a read input until the encoded input stream is empty; and
for the read input:
determining a respective symbol and a respective state according to a mapping table configured to map each symbol of an alphabet of symbols to a respective set of pairs, wherein each pair includes a respective input and a respective state, wherein a respective number of pairs in the respective set of pairs is based on the probability distribution;
persisting the determined respective state to the input stream or to the state data store; and
appending the determined respective symbol to an output stream.
9 . The method for entropy coding according to claim 8 ,
wherein persisting the determined respective state to the input stream comprises pushing the determined respective state to the input stream; and
wherein persisting the determined respective state to the data store comprises temporarily storing the determined respective state in the state data store for being read out as a part of the read input, wherein reading the fixed number of bits comprises reading from the data store first and then reading a remaining number of bits from the encoded input stream.
10 . The method for entropy coding according to claim 8 ,
wherein the mapping table represents a bijective function configured to map the alphabet of symbols to a plurality of paired inputs and states, and
wherein each state in the mapping table is distinct from any other state in the mapping table.
11 . The method for entropy coding according to claim 8 ,
wherein each state is determined based on last k bits of the respective input, and
wherein k is determined, for each of the plurality of symbols, according to the respective number of pairs.
12 . A non-transitory computer-readable medium storing instructions that, when executed by an electronic processor, cause the electronic processor to perform operations comprising the method according to claim 8 .
13 . A decoding apparatus configured to perform the method of claim 8 .
14 . The method according to claim 1 ,
wherein the method further comprises, prior to transmitting, determining, for a first symbol of the plurality of symbols, an input and appending the determined input to the encoded output stream.
15 . The method according to claim 1 , wherein each of the respective inputs in the mapping table has a predetermined fixed length and/or has a prefix-free property.
16 . The method according to claim 1 , wherein the respective state is a bit sequence uniquely associated with the respective input.
17 . The method according to claim 1 , wherein at least one of the plurality of symbols is mapped in the mapping table to at least two different pairs.
18 . The method according to claim 17 , wherein determining the respective set of pairs for the at least one of the plurality of symbols comprises selecting the at least two different pairs in the mapping table.