主权项 |
1. An encoder for encoding a sequence of symbols, comprising
an assigner configured to assign a number of parameters to each symbol of the sequence of symbols based on information comprised within previous symbols of the sequence of symbols; a plurality of entropy encoders each of which is configured to convert the symbols forwarded to the respective entropy encoder into a respective bitstream; and a selector configured to forward each symbol to a selected one of the plurality of entropy encoders, the selection depending on the number of parameters assigned to the respective symbol, wherein each entropy encoder is a variable length coder configured to map symbol sequences to codewords shorter as, or as long as, a respective maximum bit length Lx, wherein the encoder comprises, for each entropy encoder, an individual buffer for buffering the respective bitstream of the respective entropy encoder, and a global buffer, wherein the global buffer is configured to reserve a sequence of tranche entries of respective bit length Nx for the plurality of entropy encoders in a sequential order depending on an order in which the reservations of the tranche entries for the plurality of entropy encoders are triggered; wherein the plurality of entropy encoders and the respective individual buffers cooperate to trigger a reservation of a tranche entry of bit length Nx for a respective one of the entropy encoders at times where the symbols of the sequence of symbols forwarded by the selector to the plurality of entropy encoders result in a beginning of a new symbol sequence to be mapped to a codeword at the respective entropy encoder, provided that at the respective time a number of bits currently reserved in the global buffer for the respective entropy encoder minus a number Mx of bits currently buffered in the individual buffer of the respective entropy encoder or the global buffer for the respective entropy encoder is not sufficient to accommodate an intended minimum number Cx of further codewords for the respective entropy encoder plus one, times the respective maximum bit length Lx, i.e. (Cx+1)·Lx, wherein the individual buffers of the plurality of entropy encoders are configured to output buffered portions of the bitstreams to fill the respective reserved tranche entries in the global buffer, and the global buffer is configured to remove filled tranche entries of the tranche entries in the sequential order to acquire a single stream of tranches of the bitstreams of the plurality of bitstreams, interspersed into the single stream of tranches in an interleaved manner. |