Entropy coding and decoding method and device
By using the probability distribution index and preset information of the data in entropy encoding, including critical values and quantitative probability groups, the problem of excessive length of the code stream in the prior art is solved, and the code rate overhead is reduced and the transmission efficiency is improved.
Patent Information
- Application Number
- CN202311386262.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-10-23
- Publication Date
- 2025-04-25
AI Technical Summary
In the prior art, in the process of audio and video or image compression, the code stream obtained by entropy encoding is longer, resulting in an increase in the code rate overhead, making it difficult to meet the transmission requirements in networks with limited bandwidth capacity.
By obtaining the probability distribution index and preset information of the data, including the critical values and quantized probability groups corresponding to the N probability distributions, the entropy encoding method is used to shorten the code stream length. The specific steps include finding the critical value and quantizing the probability group according to the probability distribution index of the data, and performing entropy encoding.
This method can shorten the length of the code stream obtained by entropy encoding, reduce the code rate overhead, and improve transmission efficiency.
Smart Images

Figure CN119893107A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of coding and decoding, and in particular to an entropy coding and decoding method and device. Background Art
[0002] Audio and video coding (audio and video encoding and decoding) and image coding and decoding (image encoding and decoding) are widely used in digital video applications, such as broadcast digital television, video transmission on the Internet and mobile networks, real-time conversation applications such as video chat and video conferencing, Digital Versatile Disc (DVD) and Blu-ray Disc, video content acquisition and editing systems, and security applications in camcorders.
[0003] Even in the case of a short film, a large amount of audio and video data is required to describe it, which may cause difficulties when the audio and video data is to be sent or otherwise transmitted in a network with limited bandwidth capacity. Therefore, the audio and video data or image data is usually compressed before being transmitted in modern telecommunication networks. Since memory resources may be limited, the size of the audio and video data or image data may also become an issue when storing the audio and video data or image data on a storage device. Audio and video or image compression devices usually use software and / or hardware on the source side to encode the audio and video data or image data before transmission or storage, thereby reducing the amount of data required to represent the digital audio and video or image. The compressed data is then received by an audio and video or image decompression device on the destination side. With limited network resources and the growing demand for higher audio and video or image quality, there is a need for improved compression and decompression techniques that can increase the compression rate with little impact on image quality.
[0004] Among them, the audio, video or image compression process usually involves entropy coding; and the critical value and quantization probability group that entropy coding depends on affect the length of the encoded bit stream. Summary of the invention
[0005] The present application provides an entropy coding and decoding method and device. The entropy coding method can shorten the length of the code stream obtained by entropy coding and reduce the code rate overhead.
[0006] In a first aspect, an embodiment of the present application provides an entropy coding method, the method comprising: first, obtaining first data, a probability distribution index of the first data and preset information; wherein the preset information comprises N critical values and N quantization probability groups corresponding to N probability distributions; each of the N probability distributions corresponds to a critical value and a quantization probability group; the relative entropy of n probability distributions among the N probability distributions is the optimal relative entropy; the relative entropy of the first probability distribution is used to characterize the distance between the reference probability distribution corresponding to the first probability distribution and the first probability distribution, the first probability distribution being any one of the n probability distributions; N is a positive integer, n is an integer between 1 and N, and n is greater than a preset value; each of the N probability distributions corresponds to a probability distribution index; then, according to the probability distribution index of the first data, searching the critical value and quantization probability group corresponding to the first data from the preset information; and entropy coding the first data according to the critical value and quantization probability group corresponding to the first data.
[0007] Among them, the preset value may refer to the number of probability distributions whose relative entropy is the optimal relative entropy among the N probability distributions of the preset information of the prior art. In this way, the sum of the relative entropies of the N probability distributions in the preset information used in the entropy coding process of the present application is less than the sum of the relative entropies of the N probability distributions in the preset information used in the entropy coding process of the prior art; since entropy coding is performed according to the N probability distributions with the smaller sum of relative entropies, the length of the obtained code stream is smaller; therefore, the entropy coding method of the present application can shorten the length of the code stream obtained by entropy coding and reduce the bit rate overhead.
[0008] Exemplarily, a probability distribution index, ie, index, can be used to uniquely identify a probability distribution.
[0009] Exemplarily, the N probability distribution indices correspond one-to-one to the N probability distributions.
[0010] Exemplarily, the N probability distribution indexes correspond one-to-one to the N critical values.
[0011] Exemplarily, the N probability distribution indices correspond one-to-one to the N quantization probability groups.
[0012] Illustratively, a single quantization probability group includes one or more numerical values.
[0013] Exemplarily, each probability distribution among the N probability distributions is a quantized probability distribution obtained by quantizing the corresponding reference probability distribution.
[0014] For example, relative entropy (Relative Entropy) may also be referred to as KL distance; wherein KL distance is the abbreviation of Kullback-Leibler Divergence.
[0015] In a possible case, the first data may be any one of image data, audio data, and video data.
[0016] In one possible scenario, the first data may be any one of processed image data (such as features of image data), processed audio data (such as features of audio data), and processed video data (such as features of video data).
[0017] It should be noted that this application does not limit N.
[0018] According to the first aspect, the preset information is calculated based on the type of reference probability distribution with the goal of minimizing relative entropy.
[0019] Exemplarily, for the i-th probability distribution (i is an integer between 1 and N), calculation can be performed based on the type of reference probability distribution corresponding to the i-th probability distribution with the goal of minimizing relative entropy to obtain a critical value bound_table_r[i] and a quantized probability group pdf_r[i] corresponding to the i-th probability distribution.
[0020] It should be noted that the N reference probability distributions corresponding to the N probability distributions (one probability distribution corresponds to one reference probability distribution) are of the same type; this application does not impose any restrictions on the type of reference probability distribution.
[0021] According to the first aspect, or any implementation of the first aspect above, the type of the reference probability distribution is a Gaussian probability distribution type.
[0022] It should be understood that the type of the reference probability distribution may also be other probability distribution types, for example, a binomial distribution type, a Poisson distribution type, and the like.
[0023] According to the first aspect, or any implementation of the first aspect above, n=N. That is, the relative entropies of the N probability distributions are all optimal relative entropies; thus, the length of the code stream obtained by entropy coding can be shortened to the greatest extent.
[0024] According to the first aspect, or any implementation of the first aspect above, N is 32. Compared with N being 35 in the prior art (i.e., the preset information in the prior art includes 35 critical values and 35 quantization probability groups corresponding to 35 probability distributions), the present application can reduce the redundancy of the preset information and reduce the memory occupied by the preset information.
[0025] According to the first aspect, or any implementation of the first aspect above, the quantization probability group corresponding to the second probability distribution includes H numerical values, H is determined according to the critical value corresponding to the second probability distribution, H is a positive integer, and the second probability distribution is any one of the N probability distributions.
[0026] According to the first aspect, or any implementation of the first aspect above, the value range corresponding to the second probability distribution is [-(bound_table_r[i]-1), (bound_table_r[i]-1)], H is the sum of the number of integers in the value range, the value step length of the integers in the value range is M, and M is a positive integer;
[0027] Among them, bound_table_r[i] is the critical value corresponding to the second probability distribution, i is the probability distribution index of the second probability distribution, and i is a positive integer.
[0028] Exemplarily, the boundary value of the value range corresponding to the second probability distribution may be taken as a starting point, and values may be taken from the value range according to a value taking step length M to obtain an integer within the value range.
[0029] For example, assuming bound_table_r[i] = 2; if M = 1, the integers in the value range []-1, 1] include: -1, 0, 1, H = 3. If M = 2, the integers in the value range []-1, 1] include -1, 1, H = 2.
[0030] Exemplarily, each integer in the value range corresponding to the second probability distribution corresponds to a value in the quantization probability group corresponding to the second probability distribution.
[0031] According to the first aspect, or any implementation of the first aspect above, the H values are H quantized probability molecules.
[0032] According to the first aspect, or any implementation of the first aspect above, the quantization probability denominator corresponding to the quantization probability numerator is an integer power of 2.
[0033] First, the quantization probability denominator is an integer power of 2, which can facilitate the generation of preset information and improve the entropy coding efficiency.
[0034] Secondly, the quantized probability group includes the quantized probability numerator but does not include the quantized probability denominator, which can facilitate storage and further reduce the memory occupied by the preset information.
[0035] According to the first aspect, or any implementation of the first aspect above, the quantization probability denominator is 256, and the quantization probability of the marking value corresponding to each probability distribution in the N probability distributions is 1 / 256.
[0036] Since the sum of all quantization probability numerators and the quantization probability numerator of the mark value in each quantization probability group is equal to the quantization probability denominator, the quantization probability denominator is 256, which can reduce the complexity of establishing preset information to a certain extent and improve the entropy coding efficiency. In addition, it can also ensure that the number of quantization probability molecules contained in each quantization probability group will not be too large, thereby ensuring that the memory occupied by the preset information will not be too large.
[0037] Exemplarily, the tag value can be set as required, for example, the opposite number of the critical value corresponding to the probability distribution (such as -bound_table_r[i]); this application does not impose any restrictions on this.
[0038] According to the first aspect, or any implementation of the first aspect above, the first data includes multiple symbols; according to the critical value corresponding to the first data and the quantization probability group corresponding to the first data, the first data is entropy encoded, including: judging whether the absolute value of the symbol to be entropy encoded in the first data is less than the critical value corresponding to the symbol to be entropy encoded; when the absolute value of the symbol to be entropy encoded is greater than or equal to the critical value corresponding to the symbol to be entropy encoded, the first entropy encoding algorithm is used to entropy encode the symbol to be entropy encoded; the symbol to be entropy encoded is updated to a mark value; the second entropy encoding algorithm is used to entropy encode the updated symbol to be entropy encoded according to the quantization probability group corresponding to the symbol to be entropy encoded; when the absolute value of the symbol to be entropy encoded is less than the critical value corresponding to the symbol to be entropy encoded, the second entropy encoding algorithm is used to entropy encode the symbol to be entropy encoded based on the quantization probability group corresponding to the symbol to be entropy encoded. In this way, entropy encoding of symbols with smaller probabilities (i.e., long-tail symbols) can be achieved, thereby effectively shortening the length of the code stream obtained by entropy encoding.
[0039] Exemplarily, the first entropy coding algorithm may be an OUTBOUND algorithm, and the second entropy coding algorithm may be an INBOUND algorithm; it should be understood that the present application does not limit the first entropy coding algorithm and the second entropy coding algorithm.
[0040] According to the first aspect, or any implementation of the first aspect above, some of the N critical values are: 2, 2, 2, 2, 2, 3, 3.
[0041] According to the first aspect, or any implementation of the first aspect above,
[0042] The first quantization probability group includes: 251, 2, 2;
[0043] The second quantized probability group includes: 245, 5, 5;
[0044] The third quantized probability group includes: 231, 12, 12;
[0045] The fourth quantization probability group includes: 211, 22, 22;
[0046] The fifth quantized probability group includes: 188, 33, 34;
[0047] The sixth quantization probability group includes: 157, 48, 48, 1, 1;
[0048] The seventh quantization probability group includes: 134, 57, 56, 4, 4.
[0049] It should be noted that the first quantization probability group, the second quantization probability group, the third quantization probability group, ... are only for distinguishing multiple quantization probability groups, and do not represent the sorting order of the multiple quantization probability groups.
[0050] According to the first aspect, or any implementation of the first aspect above, when N=32, n=N, the N critical values are: 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 4, 4, 5, 6, 7, 8, 9, 11, 13, 16, 18, 22, 26, 32, 38, 46, 55, 65, 77, 92, 106, 128.
[0051] It should be noted that the N critical values may also be arranged in other orders, and the present application does not limit the arrangement order of the N critical values.
[0052] According to the first aspect, or any implementation of the first aspect above, when N=32, n=N,
[0053] The first quantization probability group includes: 255;
[0054] The second quantization probability group includes: 255;
[0055] The third quantization probability group includes: 255;
[0056] The fourth quantization probability group includes: 251, 2, 2;
[0057] The fifth quantization probability group includes: 245, 5, 5;
[0058] The sixth quantized probability group includes: 231, 12, 12;
[0059] The seventh quantization probability group includes: 211, 22, 22;
[0060] The eighth quantized probability group includes: 188, 33, 34;
[0061] The ninth quantization probability group includes: 157, 48, 48, 1, 1;
[0062] The tenth quantization probability group includes: 134, 57, 56, 4, 4;
[0063] The eleventh quantization probability group includes: 111, 61, 61, 10, 10, 1, 1;
[0064] The twelfth quantization probability group includes: 94, 62, 61, 17, 17, 2, 2;
[0065] The thirteenth quantized probability group includes: 77, 58, 58, 24, 24, 6, 6, 1, 1;
[0066] The fourteenth quantization probability group includes: 63, 52, 52, 29, 29, 11, 11, 3, 3, 1, 1;
[0067] The fifteenth quantization probability group includes: 52, 46, 46, 31, 30, 16, 16, 6, 6, 2, 2, 1, 1;
[0068] The sixteenth quantization probability group includes: 43, 39, 39, 30, 30, 19, 19, 10, 10, 5, 5, 2, 2, 1, 1;
[0069] The seventeenth quantization probability group includes: 35, 33, 33, 28, 28, 21, 21, 13, 13, 8, 8, 4, 4, 2, 2, 1, 1;
[0070] The eighteenth quantization probability group includes: 29, 28, 28, 25, 25, 20, 20, 15, 15, 10, 10, 7, 7, 4, 4, 2, 2, 1, 1, 1, 1;
[0071] The nineteenth quantized probability group includes: 24, 23, 23, 21, 21, 19, 18, 15, 15, 12, 12, 9, 9, 6, 6, 4, 4, 3, 3, 2, 2, 1, 1, 1, 1;
[0072] The twentieth quantized probability group includes: 19, 19, 19, 18, 18, 17, 17, 15, 15, 12, 12, 10, 10, 8, 8, 6, 6, 4, 4, 3, 3, 2, 2, 1, 1, 1, 1, 1, 1, 1;
[0073] The twenty-first quantized probability group includes: 17, 16, 16, 16, 16, 15, 15, 13, 13, 12, 12, 10, 10, 9, 9, 7, 7, 6, 6, 4, 4, 3, 3, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1;
[0074] The twenty-second quantized probability group includes: 14, 13, 13, 13, 13, 12, 12, 12, 12, 11, 11, 10, 10, 9, 9, 8, 8, 6, 6, 5, 5, 4, 5, 4, 4, 3, 3, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1;
[0075] The twenty-third quantized probability group includes: 11, 11, 11, 11, 11, 10, 10, 10, 10, 10, 9, 9, 8, 8, 7, 7, 7, 6, 6, 5, 5, 5, 4, 4, 3, 3, 3, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1;
[0076] The twenty-fourth quantized probability group includes: 9,9,9,9,9,9,9,8,8,8,8,8,8,7,7,7,7,6,6,6,6,5,5,5,5,4,4,4,4,4,4,3,3,3,3,2,2,2,2,2,2,2,2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1;
[0077] The twenty-fifth quantized probability group includes: 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 6, 6, 6, 6, 6, 5, 5, 5, 5, 5, 5, 5, 4, 4, 4, 4, 4, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1;
[0078] The twenty-sixth quantization probability group includes: 6, 6, 6, 6, 6, 6, 6, 5, 6, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 4, 4, 4, 4, 4, 4, 4, 4, 4, 3, 3, 3, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1;
[0079] The twenty-seventh quantized probability group includes: 5,5,5,5,5,5,5,5,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,3,3,3,3,3,3,3,3,3,3,3,3,3,3,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1;
[0080] The twenty-eighth quantization probability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1,1,1,1,1,1,1,1,1,1,1,1 , 1, ....
[0085] It should be understood that the N quantization probability groups may also be arranged in other orders, and the present application does not limit the order of sorting the N quantization probability groups.
[0086] In addition, the present application does not limit the arrangement order of the quantization probability molecules in each quantization probability group.
[0087] Exemplarily, the position of the i-th critical value corresponding to the i-th probability distribution among the N critical values is the same as the position of the i-th quantization probability group corresponding to the i-th probability distribution among the N quantization probability groups.
[0088] In a second aspect, an embodiment of the present application provides an entropy decoding method, the method comprising: first, receiving a code stream; then, obtaining a probability distribution index and preset information of second data in the code stream; wherein the preset information includes N critical values and N quantization probability groups corresponding to N probability distributions; each probability distribution in the N probability distributions corresponds to a critical value and a quantization probability group; the relative entropy of n probability distributions in the N probability distributions is the optimal relative entropy; wherein the relative entropy of a first probability distribution is used to characterize the distance between a reference probability distribution corresponding to the first probability distribution and the first probability distribution, and the first probability distribution is any one of the n probability distributions; N is a positive integer, n is an integer between 1 and N, and n is greater than a preset value; each probability distribution in the N probability distributions corresponds to a probability distribution index; then, according to the probability distribution index of the second data, searching the critical value and quantization probability group corresponding to the second data from the preset information; thereafter, entropy decoding the second data is performed according to the critical value and quantization probability group corresponding to the second data.
[0089] According to the second aspect, the preset information is calculated based on the type of reference probability distribution with the goal of minimizing relative entropy.
[0090] According to the second aspect, or any implementation of the second aspect, the type of the reference probability distribution is a Gaussian probability distribution type.
[0091] According to the second aspect, or any implementation of the second aspect, n=N.
[0092] According to the second aspect, or any implementation of the second aspect above, N is 32.
[0093] According to the second aspect, or any implementation of the second aspect above, the quantization probability group corresponding to the second probability distribution includes H numerical values, H is determined according to the critical value corresponding to the second probability distribution, H is a positive integer, and the second probability distribution is any one of the N probability distributions.
[0094] According to the second aspect, or any implementation of the second aspect above, the value range corresponding to the second probability distribution is [-(bound_table_r[i]-1), (bound_table_r[i]-1)], H is the sum of the number of integers in the value range, the value step length of the integers in the value range is M, and M is a positive integer;
[0095] Among them, bound_table_r[i] is the critical value corresponding to the second probability distribution, i is the probability distribution index of the second probability distribution, and i is a positive integer.
[0096] According to the second aspect, or any implementation of the second aspect, the H values are H quantized probability molecules.
[0097] According to the second aspect, or any implementation of the second aspect above, the quantization probability denominator corresponding to the quantization probability numerator is an integer power of 2.
[0098] According to the second aspect, or any implementation of the second aspect above, the quantization probability denominator is 256, and the quantization probability of the marking value corresponding to each probability distribution in the N probability distributions is 1 / 256.
[0099] According to the second aspect, or any implementation manner of the second aspect above, entropy decoding is performed on the second data according to the critical value and the quantization probability group corresponding to the second data, including: using a second entropy decoding algorithm to entropy decode the symbols to be entropy decoded based on the quantization probability group corresponding to the symbols to be entropy decoded in the second data, to obtain entropy decoded data; determining whether the entropy decoded data is a mark value; when the entropy decoded data is a mark value, entropy decoding the entropy decoded data using a first entropy decoding algorithm, and updating the entropy decoded data to the result of entropy decoding using the first entropy decoding algorithm.
[0100] According to the second aspect, or any implementation of the second aspect, some of the N critical values are: 2, 2, 2, 2, 2, 3, 3.
[0101] According to the second aspect, or any implementation of the second aspect above,
[0102] The first quantization probability group includes: 251, 2, 2;
[0103] The second quantized probability group includes: 245, 5, 5;
[0104] The third quantized probability group includes: 231, 12, 12;
[0105] The fourth quantization probability group includes: 211, 22, 22;
[0106] The fifth quantized probability group includes: 188, 33, 34;
[0107] The sixth quantization probability group includes: 157, 48, 48, 1, 1;
[0108] The seventh quantization probability group includes: 134, 57, 56, 4, 4.
[0109] According to the second aspect, or any implementation of the second aspect above, when N=32, n=N, the other critical values among the N critical values are: 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 4, 4, 5, 6, 7, 8, 9, 11, 13, 16, 18, 22, 26, 32, 38, 46, 55, 65, 77, 92, 106, 128.
[0110] According to the second aspect, or any implementation of the second aspect above, when N=32, n=N,
[0111] The first quantization probability group includes: 255;
[0112] The second quantization probability group includes: 255;
[0113] The third quantization probability group includes: 255;
[0114] The fourth quantization probability group includes: 251, 2, 2;
[0115] The fifth quantization probability group includes: 245, 5, 5;
[0116] The sixth quantized probability group includes: 231, 12, 12;
[0117] The seventh quantization probability group includes: 211, 22, 22;
[0118] The eighth quantized probability group includes: 188, 33, 34;
[0119] The ninth quantization probability group includes: 157, 48, 48, 1, 1;
[0120] The tenth quantization probability group includes: 134, 57, 56, 4, 4;
[0121] The eleventh quantization probability group includes: 111, 61, 61, 10, 10, 1, 1;
[0122] The twelfth quantization probability group includes: 94, 62, 61, 17, 17, 2, 2;
[0123] The thirteenth quantized probability group includes: 77, 58, 58, 24, 24, 6, 6, 1, 1;
[0124] The fourteenth quantization probability group includes: 63, 52, 52, 29, 29, 11, 11, 3, 3, 1, 1;
[0125] The fifteenth quantization probability group includes: 52, 46, 46, 31, 30, 16, 16, 6, 6, 2, 2, 1, 1;
[0126] The sixteenth quantization probability group includes: 43, 39, 39, 30, 30, 19, 19, 10, 10, 5, 5, 2, 2, 1, 1;
[0127] The seventeenth quantization probability group includes: 35, 33, 33, 28, 28, 21, 21, 13, 13, 8, 8, 4, 4, 2, 2, 1, 1;
[0128] The eighteenth quantization probability group includes: 29, 28, 28, 25, 25, 20, 20, 15, 15, 10, 10, 7, 7, 4, 4, 2, 2, 1, 1, 1, 1;
[0129] The nineteenth quantized probability group includes: 24, 23, 23, 21, 21, 19, 18, 15, 15, 12, 12, 9, 9, 6, 6, 4, 4, 3, 3, 2, 2, 1, 1, 1, 1;
[0130] The twentieth quantized probability group includes: 19, 19, 19, 18, 18, 17, 17, 15, 15, 12, 12, 10, 10, 8, 8, 6, 6, 4, 4, 3, 3, 2, 2, 1, 1, 1, 1, 1, 1, 1;
[0131] The twenty-first quantized probability group includes: 17, 16, 16, 16, 16, 15, 15, 13, 13, 12, 12, 10, 10, 9, 9, 7, 7, 6, 6, 4, 4, 3, 3, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1;
[0132] The twenty-second quantized probability group includes: 14, 13, 13, 13, 13, 12, 12, 12, 12, 11, 11, 10, 10, 9, 9, 8, 8, 6, 6, 5, 5, 4, 5, 4, 4, 3, 3, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1;
[0133] The twenty-third quantized probability group includes: 11, 11, 11, 11, 11, 10, 10, 10, 10, 10, 9, 9, 8, 8, 7, 7, 7, 6, 6, 5, 5, 5, 4, 4, 3, 3, 3, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1;
[0134] The twenty-fourth quantized probability group includes: 9,9,9,9,9,9,9,8,8,8,8,8,8,7,7,7,7,6,6,6,6,5,5,5,5,4,4,4,4,4,4,3,3,3,3,2,2,2,2,2,2,2,2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1;
[0135] The twenty-fifth quantized probability group includes: 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 6, 6, 6, 6, 6, 5, 5, 5, 5, 5, 5, 5, 4, 4, 4, 4, 4, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1;
[0136] The twenty-sixth quantization probability group includes: 6, 6, 6, 6, 6, 6, 6, 5, 6, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 4, 4, 4, 4, 4, 4, 4, 4, 4, 3, 3, 3, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1;
[0137] The twenty-seventh quantized probability group includes: 5,5,5,5,5,5,5,5,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,3,3,3,3,3,3,3,3,3,3,3,3,3,3,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1;
[0138] The twenty-eighth quantization probability group includes: 4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2 ,2,2,2,2,2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1;
[0139] The twenty-ninth quantized probability group includes: 3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,1,1,1,1,1,1 , 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1;
[0140] The thirtieth quantization probability group includes: 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1 , 1,1,1,1,1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1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1 , 1, ....
[0143] The second aspect and any implementation of the second aspect correspond to the first aspect and any implementation of the first aspect respectively. The technical effects corresponding to the second aspect and any implementation of the second aspect can refer to the technical effects corresponding to the above-mentioned first aspect and any implementation of the first aspect, which will not be repeated here.
[0144] In a third aspect, an embodiment of the present application provides an entropy coding method, the method comprising: first, obtaining first data, a probability distribution index of the first data, and preset information; wherein the preset information comprises N critical values and N quantization probability groups corresponding to N probability distributions, each of the N probability distributions corresponds to a critical value and a quantization probability group, and N is a positive integer; each of the N probability distributions corresponds to a probability distribution index; then, according to the probability distribution index of the first data, searching the preset information for the critical value and the quantization probability group corresponding to the first data; thereafter, entropy coding the first data according to the critical value and the quantization probability group corresponding to the first data; wherein,
[0145] The first critical value is: 2;
[0146] The second critical value is: 2;
[0147] The third critical value is: 2;
[0148] The fourth critical value is: 2;
[0149] The fifth critical value is: 2;
[0150] The sixth critical value is: 3;
[0151] The seventh critical value is: 3;
[0152] The first quantization probability group includes: 251, 2, 2;
[0153] The second quantized probability group includes: 245, 5, 5;
[0154] The third quantized probability group includes: 231, 12, 12;
[0155] The fourth quantization probability group includes: 211, 22, 22;
[0156] The fifth quantized probability group includes: 188, 33, 34;
[0157] The sixth quantization probability group includes: 157, 48, 48, 1, 1;
[0158] The seventh quantization probability group includes: 134, 57, 56, 4, 4.
[0159] The relative entropies of the multiple probability distributions corresponding to the multiple critical values and multiple quantization probability groups shown above are the optimal relative entropies; in this way, the sum of the relative entropies of the N probability distributions in the preset information used for entropy coding can be reduced; since entropy coding is performed according to the N probability distributions with smaller sums of relative entropies, the length of the obtained code stream is smaller; therefore, the entropy coding method of the present application can shorten the length of the code stream obtained by entropy coding and reduce the bit rate overhead.
[0160] It should be understood that the first critical value, the second critical value, the third critical value, ... are only for distinguishing multiple critical values, and do not represent the arrangement order of the multiple critical values.
[0161] According to the third aspect, when N=32,
[0162] The eighth critical value is: 1;
[0163] The ninth critical value is: 1;
[0164] The tenth critical value is: 1;
[0165] The eleventh critical value is: 4;
[0166] The twelfth critical value is: 4;
[0167] The thirteenth critical value is: 5;
[0168] The fourteenth critical value is: 6;
[0169] The fifteenth critical value is: 7;
[0170] The sixteenth critical value is: 8;
[0171] The seventeenth critical value is: 9;
[0172] The eighteenth critical value is: 11;
[0173] The 19th critical value is: 13;
[0174] The 20th critical value is: 16;
[0175] The 21st critical value is: 18;
[0176] The 22nd critical value is: 22;
[0177] The 23rd critical value is: 26;
[0178] The twenty-fourth critical value is: 32;
[0179] The 25th critical value is: 38;
[0180] The twenty-sixth critical value is: 46;
[0181] The 27th critical value is: 55;
[0182] The 28th critical value is: 65;
[0183] The 29th critical value is: 77;
[0184] The 30th critical value is: 92;
[0185] The 31st critical value is: 106
[0186] The thirty-second critical value is: 128.
[0187] According to the third aspect, or any implementation of the third aspect above, when N=32,
[0188] The eighth quantization probability group includes: 255;
[0189] The ninth quantization probability group includes: 255;
[0190] The tenth quantization probability group includes: 255;
[0191] The eleventh quantization probability group includes: 111, 61, 61, 10, 10, 1, 1;
[0192] The twelfth quantization probability group includes: 94, 62, 61, 17, 17, 2, 2;
[0193] The thirteenth quantized probability group includes: 77, 58, 58, 24, 24, 6, 6, 1, 1;
[0194] The fourteenth quantization probability group includes: 63, 52, 52, 29, 29, 11, 11, 3, 3, 1, 1;
[0195] The fifteenth quantization probability group includes: 52, 46, 46, 31, 30, 16, 16, 6, 6, 2, 2, 1, 1;
[0196] The sixteenth quantization probability group includes: 43, 39, 39, 30, 30, 19, 19, 10, 10, 5, 5, 2, 2, 1, 1;
[0197] The seventeenth quantization probability group includes: 35, 33, 33, 28, 28, 21, 21, 13, 13, 8, 8, 4, 4, 2, 2, 1, 1;
[0198] The eighteenth quantization probability group includes: 29, 28, 28, 25, 25, 20, 20, 15, 15, 10, 10, 7, 7, 4, 4, 2, 2, 1, 1, 1, 1;
[0199] The nineteenth quantized probability group includes: 24, 23, 23, 21, 21, 19, 18, 15, 15, 12, 12, 9, 9, 6, 6, 4, 4, 3, 3, 2, 2, 1, 1, 1, 1;
[0200] The twentieth quantized probability group includes: 19, 19, 19, 18, 18, 17, 17, 15, 15, 12, 12, 10, 10, 8, 8, 6, 6, 4, 4, 3, 3, 2, 2, 1, 1, 1, 1, 1, 1, 1;
[0201] The twenty-first quantized probability group includes: 17, 16, 16, 16, 16, 15, 15, 13, 13, 12, 12, 10, 10, 9, 9, 7, 7, 6, 6, 4, 4, 3, 3, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1;
[0202] The twenty-second quantized probability group includes: 14, 13, 13, 13, 13, 12, 12, 12, 12, 11, 11, 10, 10, 9, 9, 8, 8, 6, 6, 5, 5, 4, 5, 4, 4, 3, 3, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1;
[0203] The twenty-third quantized probability group includes: 11, 11, 11, 11, 11, 10, 10, 10, 10, 10, 9, 9, 8, 8, 7, 7, 7, 6, 6, 5, 5, 5, 4, 4, 3, 3, 3, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1;
[0204] The twenty-fourth quantized probability group includes: 9,9,9,9,9,9,9,8,8,8,8,8,8,7,7,7,7,6,6,6,6,5,5,5,5,4,4,4,4,4,4,3,3,3,3,2,2,2,2,2,2,2,2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1;
[0205] The twenty-fifth quantized probability group includes: 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 6, 6, 6, 6, 6, 5, 5, 5, 5, 5, 5, 5, 4, 4, 4, 4, 4, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1;
[0206] The twenty-sixth quantization probability group includes: 6, 6, 6, 6, 6, 6, 6, 5, 6, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 4, 4, 4, 4, 4, 4, 4, 4, 4, 3, 3, 3, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1;
[0207] The twenty-seventh quantized probability group includes: 5,5,5,5,5,5,5,5,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,3,3,3,3,3,3,3,3,3,3,3,3,3,3,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1;
[0208] The twenty-eighth quantization probability group includes: 4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2 ,2,2,2,2,2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1;
[0209] The twenty-ninth quantized probability group includes: 3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,1,1,1,1,1,1 , 1,1,1,1,1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,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1;
[0212] The thirty-second quantization probability group includes: 1, ... 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1 ,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1 , 1, ....
[0213] In a fourth aspect, an embodiment of the present application provides an entropy decoding method, the method comprising: first, receiving a code stream; then, obtaining a probability distribution index and preset information of second data in the code stream; wherein the preset information comprises N critical values and N quantization probability groups corresponding to N probability distributions, each of the N probability distributions corresponds to a critical value and a quantization probability group, and N is a positive integer; each of the N probability distributions corresponds to a probability distribution index; then, according to the probability distribution index of the second data, searching the critical value and the quantization probability group corresponding to the second data from the preset information; thereafter, entropy decoding the second data according to the critical value and the quantization probability group corresponding to the second data; wherein,
[0214] The first critical value is: 2;
[0215] The second critical value is: 2;
[0216] The third critical value is: 2;
[0217] The fourth critical value is: 2;
[0218] The fifth critical value is: 2;
[0219] The sixth critical value is: 3;
[0220] The seventh critical value is: 3;
[0221] The first quantization probability group includes: 251, 2, 2;
[0222] The second quantized probability group includes: 245, 5, 5;
[0223] The third quantized probability group includes: 231, 12, 12;
[0224] The fourth quantization probability group includes: 211, 22, 22;
[0225] The fifth quantized probability group includes: 188, 33, 34;
[0226] The sixth quantization probability group includes: 157, 48, 48, 1, 1;
[0227] The seventh quantization probability group includes: 134, 57, 56, 4, 4.
[0228] According to the fourth aspect, when N=32,
[0229] The eighth critical value is: 1;
[0230] The ninth critical value is: 1;
[0231] The tenth critical value is: 1;
[0232] The eleventh critical value is: 4;
[0233] The twelfth critical value is: 4;
[0234] The thirteenth critical value is: 5;
[0235] The fourteenth critical value is: 6;
[0236] The fifteenth critical value is: 7;
[0237] The sixteenth critical value is: 8;
[0238] The seventeenth critical value is: 9;
[0239] The eighteenth critical value is: 11;
[0240] The 19th critical value is: 13;
[0241] The 20th critical value is: 16;
[0242] The 21st critical value is: 18;
[0243] The 22nd critical value is: 22;
[0244] The 23rd critical value is: 26;
[0245] The twenty-fourth critical value is: 32;
[0246] The 25th critical value is: 38;
[0247] The twenty-sixth critical value is: 46;
[0248] The 27th critical value is: 55;
[0249] The 28th critical value is: 65;
[0250] The 29th critical value is: 77;
[0251] The 30th critical value is: 92;
[0252] The 31st critical value is: 106
[0253] The thirty-second critical value is: 128.
[0254] According to the fourth aspect, or any implementation of the fourth aspect above, when N=32,
[0255] The eighth quantization probability group includes: 255;
[0256] The ninth quantization probability group includes: 255;
[0257] The tenth quantization probability group includes: 255;
[0258] The eleventh quantization probability group includes: 111, 61, 61, 10, 10, 1, 1;
[0259] The twelfth quantization probability group includes: 94, 62, 61, 17, 17, 2, 2;
[0260] The thirteenth quantized probability group includes: 77, 58, 58, 24, 24, 6, 6, 1, 1;
[0261] The fourteenth quantization probability group includes: 63, 52, 52, 29, 29, 11, 11, 3, 3, 1, 1;
[0262] The fifteenth quantization probability group includes: 52, 46, 46, 31, 30, 16, 16, 6, 6, 2, 2, 1, 1;
[0263] The sixteenth quantization probability group includes: 43, 39, 39, 30, 30, 19, 19, 10, 10, 5, 5, 2, 2, 1, 1;
[0264] The seventeenth quantization probability group includes: 35, 33, 33, 28, 28, 21, 21, 13, 13, 8, 8, 4, 4, 2, 2, 1, 1;
[0265] The eighteenth quantization probability group includes: 29, 28, 28, 25, 25, 20, 20, 15, 15, 10, 10, 7, 7, 4, 4, 2, 2, 1, 1, 1, 1;
[0266] The nineteenth quantized probability group includes: 24, 23, 23, 21, 21, 19, 18, 15, 15, 12, 12, 9, 9, 6, 6, 4, 4, 3, 3, 2, 2, 1, 1, 1, 1;
[0267] The twentieth quantized probability group includes: 19, 19, 19, 18, 18, 17, 17, 15, 15, 12, 12, 10, 10, 8, 8, 6, 6, 4, 4, 3, 3, 2, 2, 1, 1, 1, 1, 1, 1, 1;
[0268] The twenty-first quantized probability group includes: 17, 16, 16, 16, 16, 15, 15, 13, 13, 12, 12, 10, 10, 9, 9, 7, 7, 6, 6, 4, 4, 3, 3, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1;
[0269] The twenty-second quantized probability group includes: 14, 13, 13, 13, 13, 12, 12, 12, 12, 11, 11, 10, 10, 9, 9, 8, 8, 6, 6, 5, 5, 4, 5, 4, 4, 3, 3, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1;
[0270] The twenty-third quantized probability group includes: 11, 11, 11, 11, 11, 10, 10, 10, 10, 10, 9, 9, 8, 8, 7, 7, 7, 6, 6, 5, 5, 5, 4, 4, 3, 3, 3, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1;
[0271] The twenty-fourth quantized probability group includes: 9,9,9,9,9,9,9,8,8,8,8,8,8,7,7,7,7,6,6,6,6,5,5,5,5,4,4,4,4,4,4,3,3,3,3,2,2,2,2,2,2,2,2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1;
[0272] The twenty-fifth quantized probability group includes: 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 6, 6, 6, 6, 6, 5, 5, 5, 5, 5, 5, 5, 4, 4, 4, 4, 4, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1;
[0273] The twenty-sixth quantization probability group includes: 6, 6, 6, 6, 6, 6, 6, 5, 6, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 4, 4, 4, 4, 4, 4, 4, 4, 4, 3, 3, 3, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1;
[0274] The twenty-seventh quantized probability group includes: 5,5,5,5,5,5,5,5,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,3,3,3,3,3,3,3,3,3,3,3,3,3,3,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1;
[0275] The twenty-eighth quantization probability group includes: 4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2 ,2,2,2,2,2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1;
[0276] The twenty-ninth quantized probability group includes: 3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,2,2,2,2,2,2,2,2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,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1;
[0279] The thirty-second quantization probability group includes: 1, ... 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1 ,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1 , 1, ....
[0280] In a fifth aspect, an embodiment of the present application provides a device for entropy coding, the device for entropy coding comprising:
[0281] A first information acquisition module is used to acquire first data, a probability distribution index of the first data and preset information; wherein the preset information includes N critical values and N quantized probability groups corresponding to N probability distributions; each of the N probability distributions corresponds to a critical value and a quantized probability group; the relative entropy of n probability distributions among the N probability distributions is the optimal relative entropy; wherein the relative entropy of the first probability distribution is used to characterize the distance between the reference probability distribution corresponding to the first probability distribution and the first probability distribution, and the first probability distribution is any one of the n probability distributions; N is a positive integer, n is an integer between 1 and N, and n is greater than a preset value; each of the N probability distributions corresponds to a probability distribution index;
[0282] A first information search module, used to search for a critical value and a quantization probability group corresponding to the first data from preset information according to a probability distribution index of the first data;
[0283] The first entropy coding module is used to perform entropy coding on the first data according to a critical value and a quantization probability group corresponding to the first data.
[0284] Exemplarily, the above-mentioned device for entropy coding can be used to execute the entropy coding method in the first aspect or any possible implementation manner of the first aspect.
[0285] The fifth aspect and any implementation of the fifth aspect correspond to the first aspect and any implementation of the first aspect, respectively. The technical effects corresponding to the fifth aspect and any implementation of the fifth aspect can refer to the technical effects corresponding to the first aspect and any implementation of the first aspect, which will not be repeated here.
[0286] In a sixth aspect, an embodiment of the present application provides a device for entropy decoding, the device for entropy decoding comprising:
[0287] A first code stream receiving module, used for receiving a code stream;
[0288] A second information acquisition module is used to obtain a probability distribution index and preset information of the second data in the code stream; wherein the preset information includes N critical values and N quantization probability groups corresponding to N probability distributions; each probability distribution in the N probability distributions corresponds to a critical value and a quantization probability group; the relative entropy of n probability distributions in the N probability distributions is the optimal relative entropy; the relative entropy of the first probability distribution is used to characterize the distance between the reference probability distribution corresponding to the first probability distribution and the first probability distribution, and the first probability distribution is any one of the n probability distributions; N is a positive integer, n is an integer between 1 and N, and n is greater than a preset value; each probability distribution in the N probability distributions corresponds to a probability distribution index;
[0289] A second information search module, used to search for a critical value and a quantization probability group corresponding to the second data from preset information according to a probability distribution index of the second data;
[0290] The first entropy decoding module is used to perform entropy decoding on the second data according to the critical value and the quantization probability group corresponding to the second data.
[0291] Exemplarily, the above-mentioned device for entropy decoding can be used to execute the entropy decoding method in the second aspect or any possible implementation manner of the second aspect.
[0292] The sixth aspect and any implementation of the sixth aspect correspond to the second aspect and any implementation of the second aspect, respectively. The technical effects corresponding to the sixth aspect and any implementation of the sixth aspect can refer to the technical effects corresponding to the above-mentioned second aspect and any implementation of the second aspect, which will not be repeated here.
[0293] In a seventh aspect, an embodiment of the present application provides a device for entropy coding, the device for entropy coding comprising:
[0294] A third information acquisition module is used to acquire the first data, the probability distribution index of the first data and preset information; wherein the preset information includes N critical values and N quantization probability groups corresponding to N probability distributions, each of the N probability distributions corresponds to a critical value and a quantization probability group, and N is a positive integer; each of the N probability distributions corresponds to a probability distribution index;
[0295] A third information search module, used to search for a critical value and a quantization probability group corresponding to the first data from preset information according to a probability distribution index of the first data;
[0296] A second entropy coding module, used for performing entropy coding on the first data according to a critical value and a quantization probability group corresponding to the first data;
[0297] Among them, the first critical value is: 2;
[0298] The second critical value is: 2;
[0299] The third critical value is: 2;
[0300] The fourth critical value is: 2;
[0301] The fifth critical value is: 2;
[0302] The sixth critical value is: 3;
[0303] The seventh critical value is: 3;
[0304] The first quantization probability group includes: 251, 2, 2;
[0305] The second quantized probability group includes: 245, 5, 5;
[0306] The third quantized probability group includes: 231, 12, 12;
[0307] The fourth quantization probability group includes: 211, 22, 22;
[0308] The fifth quantized probability group includes: 188, 33, 34;
[0309] The sixth quantization probability group includes: 157, 48, 48, 1, 1;
[0310] The seventh quantization probability group includes: 134, 57, 56, 4, 4.
[0311] Exemplarily, the above-mentioned device for entropy coding can be used to execute the entropy coding method in the third aspect or any possible implementation of the third aspect.
[0312] The seventh aspect and any implementation of the seventh aspect correspond to the third aspect and any implementation of the third aspect, respectively. The technical effects corresponding to the seventh aspect and any implementation of the seventh aspect can refer to the technical effects corresponding to the third aspect and any implementation of the third aspect, which will not be repeated here.
[0313] In an eighth aspect, an embodiment of the present application provides a device for entropy decoding, the device for entropy decoding comprising:
[0314] A second code stream receiving module, used for receiving a code stream;
[0315] A fourth information acquisition module is used to obtain a probability distribution index and preset information of the second data in the bitstream; wherein the preset information includes N critical values and N quantization probability groups corresponding to N probability distributions, each of the N probability distributions corresponds to a critical value and a quantization probability group, and N is a positive integer; each of the N probability distributions corresponds to a probability distribution index;
[0316] A fourth information search module, used to search for a critical value and a quantization probability group corresponding to the second data from preset information according to a probability distribution index of the second data;
[0317] A second entropy decoding module, used to perform entropy decoding on the second data according to a critical value and a quantization probability group corresponding to the second data;
[0318] Among them, the first critical value is: 2;
[0319] The second critical value is: 2;
[0320] The third critical value is: 2;
[0321] The fourth critical value is: 2;
[0322] The fifth critical value is: 2;
[0323] The sixth critical value is: 3;
[0324] The seventh critical value is: 3;
[0325] The first quantization probability group includes: 251, 2, 2;
[0326] The second quantized probability group includes: 245, 5, 5;
[0327] The third quantized probability group includes: 231, 12, 12;
[0328] The fourth quantization probability group includes: 211, 22, 22;
[0329] The fifth quantized probability group includes: 188, 33, 34;
[0330] The sixth quantization probability group includes: 157, 48, 48, 1, 1;
[0331] The seventh quantization probability group includes: 134, 57, 56, 4, 4.
[0332] Exemplarily, the above-mentioned device for entropy decoding can be used to execute the entropy decoding method in the fourth aspect or any possible implementation of the fourth aspect.
[0333] The eighth aspect and any implementation of the eighth aspect correspond to the fourth aspect and any implementation of the fourth aspect, respectively. The technical effects corresponding to the eighth aspect and any implementation of the eighth aspect can refer to the technical effects corresponding to the fourth aspect and any implementation of the fourth aspect, which will not be repeated here.
[0334] In a ninth aspect, an embodiment of the present application provides an entropy encoder, which can be used to execute the entropy encoding method in the first aspect and any one of the implementations of the first aspect.
[0335] The ninth aspect and any implementation of the ninth aspect correspond to the first aspect and any implementation of the first aspect, respectively. The technical effects corresponding to the ninth aspect and any implementation of the ninth aspect can refer to the technical effects corresponding to the first aspect and any implementation of the first aspect, which will not be repeated here.
[0336] In the tenth aspect, an embodiment of the present application provides an entropy decoder, which can be used to execute the entropy decoding method in the second aspect and any implementation manner of the second aspect.
[0337] The tenth aspect and any implementation of the tenth aspect correspond to the second aspect and any implementation of the second aspect, respectively. The technical effects corresponding to the tenth aspect and any implementation of the tenth aspect can refer to the technical effects corresponding to the above-mentioned second aspect and any implementation of the second aspect, which will not be repeated here.
[0338] In the eleventh aspect, an embodiment of the present application provides an entropy encoder, which can be used to execute the entropy encoding method in the third aspect and any implementation manner of the third aspect.
[0339] The eleventh aspect and any implementation of the eleventh aspect correspond to the third aspect and any implementation of the third aspect, respectively. The technical effects corresponding to the eleventh aspect and any implementation of the eleventh aspect can refer to the technical effects corresponding to the third aspect and any implementation of the third aspect, which will not be repeated here.
[0340] In the twelfth aspect, an embodiment of the present application provides an entropy decoder, which can be used to execute the entropy decoding method in the fourth aspect and any one of the implementations of the fourth aspect.
[0341] The twelfth aspect and any implementation of the twelfth aspect correspond to the fourth aspect and any implementation of the fourth aspect, respectively. The technical effects corresponding to the twelfth aspect and any implementation of the twelfth aspect can refer to the technical effects corresponding to the above-mentioned fourth aspect and any implementation of the fourth aspect, which will not be repeated here.
[0342] In a thirteenth aspect, an embodiment of the present application provides an encoder, which includes the entropy encoder of the ninth aspect.
[0343] The thirteenth aspect and any implementation of the thirteenth aspect correspond to the first aspect and any implementation of the first aspect, respectively. The technical effects corresponding to the thirteenth aspect and any implementation of the thirteenth aspect can refer to the technical effects corresponding to the above-mentioned first aspect and any implementation of the first aspect, which will not be repeated here.
[0344] It should be noted that the encoder in the thirteenth aspect can be a traditional encoder or an AI (Artificial Intelligence, AI) encoder.
[0345] In a fourteenth aspect, an embodiment of the present application provides a decoder, which includes the entropy decoder of the tenth aspect.
[0346] The fourteenth aspect and any implementation of the fourteenth aspect correspond to the second aspect and any implementation of the second aspect, respectively. The technical effects corresponding to the fourteenth aspect and any implementation of the fourteenth aspect can refer to the technical effects corresponding to the above-mentioned second aspect and any implementation of the second aspect, which will not be repeated here.
[0347] It should be noted that the encoder of the fourteenth aspect can be a traditional decoder or an AI decoder.
[0348] In a fifteenth aspect, an embodiment of the present application provides an encoder, which includes the entropy encoder of the eleventh aspect.
[0349] The fifteenth aspect and any implementation of the fifteenth aspect correspond to the third aspect and any implementation of the third aspect, respectively. The technical effects corresponding to the fifteenth aspect and any implementation of the fifteenth aspect can refer to the technical effects corresponding to the third aspect and any implementation of the third aspect, which will not be repeated here.
[0350] It should be noted that the encoder in the fifteenth aspect can be a traditional encoder or an AI encoder.
[0351] In a sixteenth aspect, an embodiment of the present application provides a decoder, which includes the entropy decoder of the twelfth aspect.
[0352] The sixteenth aspect and any implementation of the sixteenth aspect correspond to the fourth aspect and any implementation of the fourth aspect, respectively. The technical effects corresponding to the sixteenth aspect and any implementation of the sixteenth aspect can refer to the technical effects corresponding to the above-mentioned fourth aspect and any implementation of the fourth aspect, which will not be repeated here.
[0353] It should be noted that the encoder in the sixteenth aspect can be a traditional decoder or an AI decoder.
[0354] In the seventeenth aspect, an embodiment of the present application provides a decoder, comprising: a memory and a processor, the memory being coupled to the processor; the memory storing program instructions, which, when executed by the processor, enables the electronic device to execute the entropy coding method in the first aspect or any possible implementation of the first aspect.
[0355] The seventeenth aspect and any implementation of the seventeenth aspect correspond to the first aspect and any implementation of the first aspect, respectively. The technical effects corresponding to the seventeenth aspect and any implementation of the seventeenth aspect can refer to the technical effects corresponding to the above-mentioned first aspect and any implementation of the first aspect, which will not be repeated here.
[0356] In the eighteenth aspect, an embodiment of the present application provides a decoder, comprising: a memory and a processor, the memory being coupled to the processor; the memory storing program instructions, and when the program instructions are executed by the processor, the electronic device executes the entropy decoding method in the second aspect or any possible implementation of the second aspect.
[0357] The eighteenth aspect and any implementation of the eighteenth aspect correspond to the second aspect and any implementation of the second aspect, respectively. The technical effects corresponding to the eighteenth aspect and any implementation of the eighteenth aspect can refer to the technical effects corresponding to the above-mentioned second aspect and any implementation of the second aspect, which will not be repeated here.
[0358] In the nineteenth aspect, an embodiment of the present application provides a decoder, comprising: a memory and a processor, the memory being coupled to the processor; the memory storing program instructions, and when the program instructions are executed by the processor, the electronic device executes the entropy coding method in the third aspect or any possible implementation of the third aspect.
[0359] The nineteenth aspect and any implementation of the nineteenth aspect correspond to the third aspect and any implementation of the third aspect, respectively. The technical effects corresponding to the nineteenth aspect and any implementation of the nineteenth aspect can refer to the technical effects corresponding to the third aspect and any implementation of the third aspect, which will not be repeated here.
[0360] In the twentieth aspect, an embodiment of the present application provides a decoder, comprising: a memory and a processor, the memory being coupled to the processor; the memory storing program instructions, and when the program instructions are executed by the processor, the electronic device executes the entropy decoding method in the fourth aspect or any possible implementation of the fourth aspect.
[0361] The twentieth aspect and any implementation of the twentieth aspect correspond to the fourth aspect and any implementation of the fourth aspect, respectively. The technical effects corresponding to the twentieth aspect and any implementation of the twentieth aspect can refer to the technical effects corresponding to the fourth aspect and any implementation of the fourth aspect, which will not be repeated here.
[0362] In the twenty-first aspect, an embodiment of the present application provides a computer-readable storage medium, which stores a computer program. When the computer program runs on a computer or a processor, the computer or the processor executes the entropy coding method in the first aspect or any possible implementation of the first aspect, or the computer or the processor executes the entropy coding method in the third aspect or any possible implementation of the third aspect.
[0363] The twenty-first aspect and any implementation of the twenty-first aspect correspond to the first aspect and any implementation of the first aspect, or correspond to the third aspect and any implementation of the third aspect, respectively. The technical effects corresponding to the twenty-first aspect and any implementation of the twenty-first aspect can refer to the technical effects corresponding to the first aspect and any implementation of the first aspect, or refer to the technical effects corresponding to the third aspect and any implementation of the third aspect, which will not be repeated here.
[0364] In the twenty-second aspect, an embodiment of the present application provides a computer-readable storage medium, which stores a computer program. When the computer program runs on a computer or a processor, the computer or the processor executes the entropy decoding method in the second aspect or any possible implementation of the second aspect, or executes the entropy decoding method in the fourth aspect or any possible implementation of the fourth aspect.
[0365] The twenty-second aspect and any implementation of the twenty-second aspect correspond to the second aspect and any implementation of the second aspect, respectively, or correspond to the fourth aspect and any implementation of the fourth aspect, respectively. The technical effects corresponding to the twenty-second aspect and any implementation of the twenty-second aspect may refer to the technical effects corresponding to the above-mentioned second aspect and any implementation of the second aspect, or may refer to the above-mentioned fourth aspect and the technical effects corresponding to any implementation of the fourth aspect, which will not be repeated here.
[0366] In the twenty-third aspect, an embodiment of the present application provides a computer program product, which includes computer instructions. When the computer instructions are executed by a computer or a processor, the computer or the processor executes the entropy coding method in the first aspect or any possible implementation of the first aspect, or the computer or the processor executes the entropy coding method in the third aspect or any possible implementation of the third aspect.
[0367] The twenty-third aspect and any implementation of the twenty-third aspect correspond to the first aspect and any implementation of the first aspect, or correspond to the third aspect and any implementation of the third aspect, respectively. The technical effects corresponding to the twenty-third aspect and any implementation of the twenty-third aspect can refer to the technical effects corresponding to the above-mentioned first aspect and any implementation of the first aspect, or can refer to the technical effects corresponding to the above-mentioned third aspect and any implementation of the third aspect, which will not be repeated here.
[0368] In the twenty-fourth aspect, an embodiment of the present application provides a computer program product, which includes computer instructions. When the computer instructions are executed by a computer or a processor, the computer or the processor executes the entropy decoding method in the second aspect or any possible implementation of the second aspect, or executes the entropy decoding method in the fourth aspect or any possible implementation of the fourth aspect.
[0369] The twenty-fourth aspect and any implementation of the twenty-fourth aspect correspond to the second aspect and any implementation of the second aspect, respectively, or correspond to the fourth aspect and any implementation of the fourth aspect, respectively. The technical effects corresponding to the twenty-fourth aspect and any implementation of the twenty-fourth aspect can refer to the technical effects corresponding to the above-mentioned second aspect and any implementation of the second aspect, or can refer to the above-mentioned fourth aspect and the technical effects corresponding to any implementation of the fourth aspect, which are not repeated here.
[0370] In aspect 25, an embodiment of the present application provides a method for generating a bitstream, which can generate a bitstream according to the above-mentioned first aspect and any one of the implementation methods of the first aspect; or, generate a bitstream according to the above-mentioned third aspect and any one of the implementation methods of the third aspect.
[0371] The twenty-fifth aspect and any implementation of the twenty-fifth aspect correspond to the first aspect and any implementation of the first aspect, or correspond to the third aspect and any implementation of the third aspect, respectively. The technical effects corresponding to the twenty-fifth aspect and any implementation of the twenty-fifth aspect can refer to the technical effects corresponding to the above-mentioned first aspect and any implementation of the first aspect, or can refer to the technical effects corresponding to the above-mentioned third aspect and any implementation of the third aspect, which will not be repeated here.
[0372] In aspect 26, an embodiment of the present application provides a device for storing a code stream, the device comprising: a receiver and at least one storage medium, the receiver being used to receive the code stream; the at least one storage medium being used to store the code stream; the code stream is generated according to the first aspect and any one of the implementation methods of the first aspect, or generated according to the third aspect and any one of the implementation methods of the third aspect.
[0373] The twenty-sixth aspect and any implementation of the twenty-sixth aspect correspond to the first aspect and any implementation of the first aspect, or correspond to the third aspect and any implementation of the third aspect, respectively. The technical effects corresponding to the twenty-sixth aspect and any implementation of the twenty-sixth aspect can refer to the technical effects corresponding to the above-mentioned first aspect and any implementation of the first aspect, or can refer to the technical effects corresponding to the above-mentioned third aspect and any implementation of the third aspect, which will not be repeated here.
[0374] In aspect twenty-seven, an embodiment of the present application provides a device for transmitting a code stream, the device comprising: a transmitter and at least one storage medium, the at least one storage medium is used to store the code stream, the code stream is generated according to the first aspect and any one of the implementation methods of the first aspect, or is generated according to the third aspect and any one of the implementation methods of the third aspect; the transmitter is used to obtain the code stream from the storage medium and send the code stream to the terminal side device through the transmission medium.
[0375] The twenty-seventh aspect and any implementation of the twenty-seventh aspect correspond to the first aspect and any implementation of the first aspect, or correspond to the third aspect and any implementation of the third aspect, respectively. The technical effects corresponding to the twenty-seventh aspect and any implementation of the twenty-seventh aspect can refer to the technical effects corresponding to the above-mentioned first aspect and any implementation of the first aspect, or can refer to the technical effects corresponding to the above-mentioned third aspect and any implementation of the third aspect, which will not be repeated here.
[0376] In aspect 28, an embodiment of the present application provides a system for distributing code streams, the system comprising: at least one storage medium for storing at least one code stream, the at least one code stream being generated according to the first aspect and any one of the implementation methods of the first aspect, or generated according to the third aspect and any one of the implementation methods of the third aspect, a streaming media device for obtaining a target code stream from the at least one storage medium and sending the target code stream to an end-side device, wherein the streaming media device comprises a content server or a content distribution server.
[0377] The twenty-eighth aspect and any implementation of the twenty-eighth aspect correspond to the first aspect and any implementation of the first aspect, or correspond to the third aspect and any implementation of the third aspect, respectively. The technical effects corresponding to the twenty-eighth aspect and any implementation of the twenty-eighth aspect can refer to the technical effects corresponding to the first aspect and any implementation of the first aspect, or refer to the technical effects corresponding to the third aspect and any implementation of the third aspect, which will not be repeated here.
[0378] It should be noted that the entropy encoding method and entropy decoding method of the present application can be implemented by software or by hardware, and the present application does not impose any restrictions on this.
[0379] It should be noted that the present application does not limit the algorithms used for entropy coding and decoding, for example, it may be Huffman coding (Huffman code), arithmetic coding (AC), asymmetric digital system (ANS), etc. BRIEF DESCRIPTION OF THE DRAWINGS
[0380] Figure 1A A frame of an example of an audio / video / image decoding system for implementing an embodiment of the present invention;
[0381] Figure 1B A block diagram of another example of an audio / video / image decoding system for implementing an embodiment of the present invention;
[0382] Figure 2 is a schematic diagram of an encoder shown as an example;
[0383] Figure 3 is a schematic diagram of an exemplary decoder;
[0384] Figure 4 is a schematic diagram of the structure of an encoder shown as an example;
[0385] Figure 5 is a schematic diagram of the structure of a decoder shown as an example;
[0386] Figure 6 is a schematic diagram of the structure of an encoder shown as an example;
[0387] Figure 7 is a schematic diagram of the structure of a decoder shown as an example;
[0388] Figure 8 is a flowchart of an exemplary entropy coding process;
[0389] Fig. 9 is a flowchart of an exemplary entropy decoding process;
[0390] Fig.10 is a schematic diagram of an apparatus for entropy coding shown as an example;
[0391] Fig.11 is a schematic diagram of an apparatus for entropy decoding shown as an example;
[0392] Fig.12 is a schematic diagram of an apparatus for entropy coding shown as an example;
[0393] Fig.13 is a schematic diagram of an apparatus for entropy decoding shown as an example;
[0394] Fig.14 Schematic diagram of the structure of the device shown as an example. DETAILED DESCRIPTION
[0395] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0396] The term "and / or" in this article is merely a description of the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone.
[0397] The terms "first" and "second" in the description and claims of the embodiments of the present application are used to distinguish different objects rather than to describe a specific order of objects. For example, a first target object and a second target object are used to distinguish different target objects rather than to describe a specific order of target objects.
[0398] In the embodiments of the present application, the words "exemplarily" or "for example" are used to indicate examples, illustrations or explanations. Any embodiment or design described as "exemplarily" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplarily" or "for example" is intended to present related concepts in a specific way.
[0399] In the description of the embodiments of the present application, unless otherwise specified, the meaning of "multiple" refers to two or more than two. For example, multiple processing units refer to two or more processing units; multiple systems refer to two or more systems.
[0400] Exemplarily, the entropy coding and decoding method involved in the present application can be applied to entropy coding and decoding of audio, video and image. The present application is described by taking entropy coding and decoding of video as an example.
[0401] Exemplarily, the entropy coding and decoding method of the present application can be applied to traditional coding and decoding scenarios or to AI coding and decoding scenarios, and the present application does not impose any restrictions on this.
[0402] Video coding generally refers to processing a sequence of images that form a video or video sequence. In the field of video coding, the terms "picture", "frame" or "image" can be used as synonyms. Video coding (or commonly referred to as coding) includes two parts: video encoding and video decoding. Video coding is performed on the source side and generally includes processing (e.g., compressing) the original video image to reduce the amount of data required to represent the video image (thereby more efficiently storing and / or transmitting). Video decoding is performed on the destination side and generally includes inverse processing relative to the encoder to reconstruct the video image. The "encoding" of the video image (or commonly referred to as the image) involved in the embodiment should be understood as the "encoding" or "decoding" of the video image or video sequence. The encoding part and the decoding part are also collectively referred to as codec (encoding and decoding, CODEC).
[0403] In the case of lossless video coding, the original video image can be reconstructed, that is, the reconstructed video image has the same quality as the original video image (assuming no transmission loss or other data loss during storage or transmission). In the case of lossy video coding, further compression is performed by quantization, etc. to reduce the amount of data required to represent the video image, but the decoder side cannot fully reconstruct the video image, that is, the quality of the reconstructed video image is lower or worse than the quality of the original video image.
[0404] In the following embodiment of the decoding system 10, the encoder 20 and the decoder 30 are based on Figures 1A to 7 Give a description.
[0405] Figure 1A 1 is an exemplary block diagram of a decoding system 10 of an embodiment of the present application, for example, a video decoding system 10 (or simply a decoding system 10) that can utilize the techniques of the present application. The video encoder 20 (or simply an encoder 20) and the video decoder 30 (or simply a decoder 30) in the video decoding system 10 represent devices that can be used to perform various techniques according to various examples described in the present application.
[0406] like Figure 1A As shown, the decoding system 10 includes a source device 12, which is used to provide encoded image data 21 such as encoded images to a destination device 14 for decoding the encoded image data 21.
[0407] The source device 12 includes an encoder 20 , and may additionally or optionally include an image source 16 , a preprocessor (or a preprocessing unit) 18 such as an image preprocessor, and a communication interface (or a communication unit) 22 .
[0408] The image source 16 may include or may be any type of image capture device for capturing real-world images, etc., and / or any type of image generation device, such as a computer graphics processor for generating computer-animated images or any type of device for acquiring and / or providing real-world images, computer-generated images (e.g., screen content, virtual reality (VR) images, and / or any combination thereof (e.g., augmented reality (AR) images). The image source may be any type of memory or storage that stores any of the above images.
[0409] In order to distinguish the processing performed by the pre-processor (or pre-processing unit) 18 , the image (or image data) 17 may also be referred to as a raw image (or raw image data) 17 .
[0410] The preprocessor 18 is used to receive the original image data 17 and preprocess the original image data 17 to obtain a preprocessed image (or preprocessed image data) 19. For example, the preprocessing performed by the preprocessor 18 may include trimming, color format conversion (e.g., from RGB to YCbCr), color adjustment, or denoising. It is understood that the preprocessing unit 18 may be an optional component.
[0411] The video encoder (or encoder) 20 is used to receive the pre-processed image data 19 and provide the encoded image data 21 (hereinafter referred to as Figure 2 , Figure 4 and Figure 6 etc. for further description).
[0412] The communication interface 22 in the source device 12 can be used to receive the encoded image data 21 and send the encoded image data 21 (or any other processed version) to another device such as the destination device 14 or any other device through the communication channel 13 for storage or direct reconstruction.
[0413] The destination device 14 includes a decoder 30 and, in addition or alternatively, may include a communication interface (or communication unit) 28 , a post-processor (or post-processing unit) 32 , and a display device 34 .
[0414] The communication interface 28 in the destination device 14 is used to receive the encoded image data 21 (or any other processed version) directly from the source device 12 or from any other source device such as a storage device, for example, the storage device is a encoded image data storage device, and provide the encoded image data 21 to the decoder 30.
[0415] The communication interface 22 and the communication interface 28 can be used to send or receive encoded image data (or encoded data) 21 through a direct communication link between the source device 12 and the destination device 14, such as a direct wired or wireless connection, or through any type of network, such as a wired network, a wireless network or any combination thereof, any type of private network and public network or any type of combination thereof.
[0416] For example, the communication interface 22 may be used to encapsulate the encoded image data 21 into a suitable format such as a message, and / or process the encoded image data using any type of transmission coding or processing for transmission over a communication link or network.
[0417] The communication interface 28 corresponds to the communication interface 22 , for example, and can be used to receive transmission data and process the transmission data using any type of corresponding transmission decoding or processing and / or decapsulation to obtain the encoded image data 21 .
[0418] Both the communication interface 22 and the communication interface 28 can be configured as follows Figure 1AA unidirectional communication interface, or a bidirectional communication interface, indicated by an arrow pointing from the source device 12 to the corresponding communication channel 13 of the destination device 14, and can be used to send and receive messages, etc. to establish a connection, confirm and exchange any other information related to the communication link and / or data transmission such as encoded image data transmission, etc.
[0419] The video decoder (or decoder) 30 is used to receive the encoded image data 21 and provide decoded image data (or decoded image data) 31 (hereinafter referred to as Figure 3 , Figure 5 or Figure 7 etc. for further description).
[0420] The post-processor 32 is used to post-process the decoded image data 31 (also called reconstructed image data) such as the decoded image to obtain the post-processed image data 33 such as the post-processed image. The post-processing performed by the post-processing unit 32 may include, for example, color format conversion (e.g., from YCbCr to RGB), color adjustment, cropping or resampling, or any other processing for generating the decoded image data 31 for display by the display device 34 or the like.
[0421] The display device 34 is used to receive the post-processed image data 33 to display the image to a user or viewer, etc. The display device 34 can be or include any type of display for displaying the reconstructed image, such as an integrated or external display screen or display. For example, the display screen can include a liquid crystal display (LCD), an organic light emitting diode (OLED) display, a plasma display, a projector, a micro LED display, a liquid crystal on silicon (LCoS), a digital light processor (DLP), or any other type of display screen.
[0422] although Figure 1A The source device 12 and the destination device 14 are shown as independent devices, but the device embodiment may also include the source device 12 and the destination device 14 or the functions of the source device 12 and the destination device 14 at the same time, that is, the source device 12 or the corresponding function and the destination device 14 or the corresponding function at the same time. In these embodiments, the source device 12 or the corresponding function and the destination device 14 or the corresponding function can be implemented using the same hardware and / or software or by separate hardware and / or software or any combination thereof.
[0423] According to the description, Figure 1AThe presence and (exact) division of different units or functions in the source device 12 and / or the destination device 14 shown may vary depending on the actual device and application, which will be obvious to the skilled person.
[0424] The encoder 20 (eg, video encoder 20) or the decoder 30 (eg, video decoder 30) or both may be configured as follows: Figure 1B The processing circuitry shown may be implemented, for example, one or more microprocessors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), discrete logic, hardware, video encoding dedicated processors, or any combination thereof. The encoder 20 may be implemented by processing circuitry 46 to include reference Figure 2 The various modules discussed in encoder 20 and / or any other encoder system or subsystem described herein. Decoder 30 may be implemented by processing circuit 46 to include reference Figure 3 The various modules discussed in decoder 30 and / or any other decoder systems or subsystems described herein. Processing circuitry 46 may be used to perform the various operations discussed below. Figure 5 As shown, if part of the technology is implemented in software, the device can store the instructions of the software in a suitable non-transitory computer-readable storage medium, and use one or more processors to execute the instructions in hardware, thereby performing the technology of the present application. One of the video encoder 20 and the video decoder 30 can be integrated into a single device as part of a combined codec (encoder / decoder, CODEC), such as Figure 1B shown.
[0425] Source device 12 and destination device 14 may include any of a variety of devices, including any type of handheld or fixed device, such as a notebook or laptop computer, a mobile phone, a smart phone, a tablet or tablet computer, a camera, a desktop computer, a set-top box, a television, a display device, a digital media player, a video game console, a video streaming device (e.g., a content service server or a content distribution server), a broadcast receiving device, a broadcast transmitting device, etc., and may not use or use any type of operating system. In some cases, source device 12 and destination device 14 may be equipped with components for wireless communication. Therefore, source device 12 and destination device 14 may be wireless communication devices.
[0426] In some cases, Figure 1AThe video decoding system 10 shown is merely exemplary, and the techniques provided herein may be applicable to video encoding settings (e.g., video encoding or video decoding) that do not necessarily include any data communication between an encoding device and a decoding device. In other examples, data is retrieved from a local memory, sent over a network, and so on. A video encoding device may encode data and store the data in a memory, and / or a video decoding device may retrieve data from a memory and decode the data. In some examples, encoding and decoding are performed by devices that do not communicate with each other but only encode data to a memory and / or retrieve and decode data from a memory.
[0427] Figure 1B FIG. 4 is an exemplary block diagram of a video decoding system 40 according to an embodiment of the present application. Figure 1B As shown, the video decoding system 40 may include an imaging device 41, a video encoder 20, a video decoder 30 (and / or a video encoder / decoder implemented by a processing circuit 46), an antenna 42, one or more processors 43, one or more memory storages 44 and / or a display device 45.
[0428] like Figure 1B As shown, imaging device 41, antenna 42, processing circuit 46, video encoder 20, video decoder 30, processor 43, memory storage 44 and / or display device 45 can communicate with each other. In different examples, video decoding system 40 can include only video encoder 20 or only video decoder 30.
[0429] In some instances, antenna 42 can be used to transmit or receive a coded bit stream of video data. In addition, in some instances, display device 45 can be used to present video data. Processing circuit 46 can include application-specific integrated circuit (ASIC) logic, graphics processor, general processor, etc. Video decoding system 40 can also include optional processor 43, which can similarly include application-specific integrated circuit (ASIC) logic, graphics processor, general processor, etc. In addition, memory storage 44 can be any type of memory, such as volatile memory (e.g., static random access memory (SRAM), dynamic random access memory (DRAM), etc.) or non-volatile memory (e.g., flash memory, etc.). In a non-limiting example, memory storage 44 can be implemented by cache memory. In other instances, processing circuit 46 can include memory (e.g., cache, etc.) for implementing image buffer, etc.
[0430] In some examples, video encoder 20 implemented by logic circuits may include an image buffer (e.g., implemented by processing circuit 46 or memory storage 44) and a graphics processing unit (e.g., implemented by processing circuit 46). The graphics processing unit may be communicatively coupled to the image buffer. The graphics processing unit may include video encoder 20 implemented by processing circuit 46 to implement reference Figure 2 (or Figure 4 or Figure 6 ) and / or the various modules discussed in any other encoder system or subsystem described herein. Logic circuits can be used to perform the various operations discussed herein.
[0431] In some examples, video decoder 30 may be implemented in a similar manner by processing circuitry 46 to implement reference Figure 3 (or Figure 5 or Figure 7 ) and / or any other decoder system or subsystem described herein. In some examples, the video decoder 30 implemented by logic circuitry may include an image buffer (implemented by processing circuitry 46 or memory storage 44) and a graphics processing unit (e.g., implemented by processing circuitry 46). The graphics processing unit may be communicatively coupled to the image buffer. The graphics processing unit may include the video decoder 30 implemented by processing circuitry 46 to implement the reference Figure 3and / or the various modules discussed herein for any other decoder system or subsystem described herein.
[0432] In some examples, antenna 42 may be used to receive an encoded bitstream of video data. As discussed, the encoded bitstream may include data related to the encoded video frames discussed herein, indicators, index values, mode selection data, etc., such as data related to the encoded partitions (e.g., transform coefficients or quantized transform coefficients, (as discussed) optional indicators, and / or data defining the encoded partitions). Video decoding system 40 may also include video decoder 30 coupled to antenna 42 and used to decode the encoded bitstream. Display device 45 is used to present the video frames.
[0433] It should be understood that for the examples described with reference to the video encoder 20 in the embodiments of the present application, the video decoder 30 can be used to perform the reverse process. With respect to the signaling syntax elements, the video decoder 30 can be used to receive and parse such syntax elements and decode the related video data accordingly. In some examples, the video encoder 20 can entropy encode the syntax elements into an encoded video bitstream. In such examples, the video decoder 30 can parse such syntax elements and decode the related video data accordingly.
[0434] For ease of description, the embodiments of the present application are described with reference to the universal video coding (VVC) reference software or the high-efficiency video coding (HEVC) developed by the video coding joint working group (joint collaboration team on video coding, JCT-VC) of the ITU-T video coding experts group (VCEG) and the ISO / IEC motion picture experts group (MPEG). Those of ordinary skill in the art understand that the embodiments of the present application are not limited to HEVC or VVC.
[0435] Figure 2 is a schematic diagram of an encoder shown as an example.
[0436] Reference Figure 2 , exemplarily, the encoder 20 may be an entropy encoder 20. The entropy encoder 20 may be used to determine a critical value and a quantization probability group corresponding to the first data 41 according to the probability distribution index 42; then, entropy encoding is performed on the first data 41 according to the critical value and the quantization probability group corresponding to the first data 41 to obtain a code stream 43 (an example of the encoded image data 21).
[0437] Figure 3FIG. 4 is a schematic diagram of a decoder shown as an example.
[0438] Reference Figure 3 , exemplarily, the decoder 30 may be an entropy decoder 30. The entropy decoder 30 may be used to determine the critical value and the quantization probability group corresponding to the second data in the bitstream 43 according to the probability distribution index 42; then, according to the critical value and the quantization probability group corresponding to the second data in the bitstream 43, entropy decode the second data in the bitstream 43 to obtain entropy decoded data 44 (an example of the decoded image data 31).
[0439] Figure 4 Schematic diagram of the structure of an encoder shown as an example.
[0440] Reference Figure 4 Exemplarily, the encoder 20 may include a first processing module 201 , a second processing module 202 and an entropy encoder 203 .
[0441] Exemplarily, the first processing module 201 may be used to process the original data 45 (which may be Figure 1A The original image data 17 or pre-processed image data 19) is processed to obtain the first data 41.
[0442] Exemplarily, the second processing module 202 may be used to generate a probability distribution index 42 of the first data.
[0443] In a possible manner, the original data 45 may be input into the second processing module 202 , and the second processing module 202 processes the original data 45 to obtain the probability distribution index 42 of the first data.
[0444] In a possible manner, the prior information (such as encoded data) may be input into the second processing module 202 , and the second processing module 202 processes the prior information to obtain the probability distribution index 42 of the first data.
[0445] In a possible manner, the features of the original data 45 may be input into the second processing module 202 , and the second processing module 202 processes the features of the original data 45 to obtain the probability distribution index 42 of the first data.
[0446] It should be understood that the present application does not limit the manner in which the second processing module 202 generates the probability distribution index 42 of the first data.
[0447] Exemplarily, the entropy coding module 203 can be used to determine the critical value and quantization probability group corresponding to the first data 41 according to the probability distribution index 42; then, according to the critical value and quantization probability group corresponding to the first data 41, entropy encode the first data 41 to obtain a code stream 43.
[0448] Figure 5 FIG. 4 is a schematic diagram of the structure of a decoder shown as an example.
[0449] Reference Figure 5 , exemplarily, the decoder 30 may include a fourth processing module 204 , a third processing module 206 and an entropy decoder 205 .
[0450] Exemplarily, the fourth processing module 204 may be used to generate a probability distribution index 42 of the second data.
[0451] In one possible manner, the prior information (such as decoded data) can be input to the fourth processing module 204, and the fourth processing module 204 processes the prior information to obtain the probability distribution index 42 of the second data. In this case, the second processing module 202 in the encoder 20 and the fourth processing module 204 in the decoder 30 can be the same module (or a module with the same function).
[0452] In a possible manner, the code stream may be input to the fourth processing module 204, and the fourth processing module 204 parses the code stream to obtain the probability distribution index 42 of the second data.
[0453] In one possible manner, the code stream can be input into the entropy decoder 205 to obtain the features corresponding to the probability distribution index 42 of the second data; the features corresponding to the probability distribution index 42 of the second data are input into the fourth processing module 204, and the fourth processing module 204 processes them to obtain the probability distribution index 42 of the second data.
[0454] It should be understood that the present application does not limit the manner in which the fourth processing module 204 generates the probability distribution index 42 of the second data.
[0455] Exemplarily, the entropy decoder 205 can be used to determine the critical value and quantization probability group corresponding to the second data 46 in the bitstream 43 according to the probability distribution index 42; then, according to the critical value and quantization probability group corresponding to the second data 46 in the bitstream 43, the second data 46 in the bitstream 43 is entropy decoded to obtain entropy decoded data 47.
[0456] Exemplarily, the third processing module 206 may be used to process the entropy decoded data 47 to obtain the reconstructed data 48 (an example of the decoded image data 31 ).
[0457] It should be noted that the first processing module 201, the second processing module 202, the third processing module 206 and the fourth processing module 204 can be AI models or traditional probability models, and the present application does not impose any limitation on this.
[0458] Figure 6 Schematic diagram of the structure of an encoder shown as an example. Figure 6 The encoder in is AI encoder 20.
[0459] Reference Figure 6 , exemplarily, the AI encoder 20 may include an encoding network 401, a super encoding network 4021, a super decoding network 4022, and an entropy encoder 403. The encoding network 401 is an example of the first processing module 201, and the super prior network is an example of the second processing module 202. The super prior network includes a super encoding network 4021 and a super decoding network 4022.
[0460] Reference Figure 6 , the encoding process for the image 51 (an example of the original data 45) can be as follows:
[0461] Exemplarily, the image 51 is input into the encoding network 401, and the encoding network 401 extracts features from the image 51 to obtain a first feature map 52. Thereafter, the first feature map 52 may be input into the super encoding network 4021.
[0462] Exemplarily, the super encoding network 4021 can perform feature extraction on the first feature map 52 to obtain a second feature map 53. On the one hand, the second feature map 53 is input to the super decoding network 4022, and the super decoding network 4022 processes the second feature map 53 to obtain a third feature map 54 and a probability distribution index 55 of the first feature map. On the other hand, the second feature map 53 is input to the entropy encoder 403, and the entropy encoder 403 performs entropy encoding on the second feature map 53 to obtain a code stream 2 (58).
[0463] Exemplarily, the difference between the first feature map 52 and the third feature map 54 may be calculated to obtain a residual 56 (an example of the first data 41 ).
[0464] Exemplarily, the probability distribution index 55 of the first feature map (also referred to as the probability distribution index 55 of the residual) and the residual 56 can be input into the entropy encoder 403; the entropy encoder 403 determines the critical value and quantization probability group corresponding to the residual 56 based on the probability distribution index 55 of the residual; then, the residual 56 is entropy encoded based on the critical value and quantization probability group corresponding to the residual 56 to obtain a bitstream 1 (57).
[0465] Figure 7 FIG. 4 is a schematic diagram of the structure of a decoder shown as an example. Figure 7 The decoder in is an AI decoder.
[0466] Reference Figure 7, exemplarily, the AI decoder 30 may include a super decoding network 501, an entropy decoder 502, and a decoding network 503. The decoding network 503 is an example of the third processing module 206, and the super decoding network 401 is an example of the fourth processing module 204. The super decoding network 4022 and the super decoding network 501 are the same network.
[0467] Reference Figure 7 , the decoding process can be as follows:
[0468] Exemplarily, the code stream 1 (57) and the code stream 2 (58) may be input to the entropy decoder 502. The entropy decoder 502 may perform entropy decoding on the code stream 2 (58) to obtain a second feature map 53, and input the second feature map 53 to the super decoding network 501.
[0469] Exemplarily, the super decoding network 501 can process the second feature map 53 to obtain the probability distribution index 55 of the second data and the third feature map 54; and input the probability distribution index 55 of the second data into the entropy decoder 502.
[0470] Exemplarily, the entropy decoder 502 can determine the critical value and quantization probability group corresponding to the second data 46 in the bitstream 1 (57) based on the probability distribution index 55 of the second data; then, according to the critical value and quantization probability group corresponding to the second data 46 in the bitstream 1 (57), entropy decode the second data 46 in the bitstream 1 (57) to obtain the residual 56.
[0471] Exemplarily, the residual 56 and the third feature map 54 may be added to obtain the first feature map 52 ; and the first feature map 52 may be input into the decoding network 503 .
[0472] Exemplarily, the decoding network 503 may perform feature recovery on the first feature map 52 to obtain a reconstructed image 59 (an example of the reconstructed data 48 ).
[0473] The entropy encoding process and the entropy decoding process are described below.
[0474] Exemplarily, multiple probability distributions may be preset, and for each probability distribution, a corresponding index (index, which may also be referred to as a probability distribution index) may be set; and for each probability distribution, a corresponding critical value and a quantization probability group may be calculated. Afterwards, a relationship between the probability distribution index, the critical value, and the quantization probability group may be established, and the relationship, the critical value, and the quantization probability group may be combined to form preset information for storage.
[0475] For example, assuming that the number of pre-set probability distributions is N (N is a positive integer), N probability distribution indexes may be set for the N probability distributions. For example, the N indexes corresponding to the N probability distributions are: 0, 1, 2, ..., N-1.
[0476] Furthermore, calculations may be performed according to the type of reference probability distribution with the goal of minimizing relative entropy to obtain N critical values and N quantization probability groups.
[0477] Exemplarily, for the ith probability distribution, calculation may be performed according to the type of the reference probability distribution with the goal of minimizing the relative entropy to obtain a critical value bound_table_r[i] and a quantized probability group pdf_r[i] corresponding to the ith probability distribution.
[0478] It should be noted that the present application does not limit the type of reference probability distribution.
[0479] The following takes the Gaussian distribution type as an example of the reference probability distribution to explain how to determine the critical value bound_table_r[i] corresponding to the i-th probability distribution and the quantized probability group pdf_r[i] as an example of the quantized probability group.
[0480] The reference probability distribution corresponding to the ith probability distribution can be a Gaussian distribution with a mean of 0 and a variance of σ. The process of determining the critical value and quantized probability group corresponding to the ith probability distribution is the process of quantizing the reference probability distribution corresponding to the ith probability distribution, and finally the ith probability distribution (also called the ith quantized probability distribution) can be obtained; wherein the mean corresponding to the ith probability distribution is 0 and the variance is σ. Specifically:
[0481] First, calculate P(x) for each integer x from -16384 to 16383, which can be referred to the following formula (1):
[0482]
[0483] Next, minimize the objective function; wherein the objective function can be shown as formula (2):
[0484]
[0485] Wherein, j is an integer between -16384 and 16383; B is a critical value, Q is a quantization probability group, and B and Q(j) (Q(j) is a value in the quantization probability group) are both positive integers.
[0486] Exemplarily, the physical meaning of the objective function may refer to: the expected number of bits increased in the code stream after a symbol is encoded using INBOUND+OUTBOUND.
[0487] Exemplarily, by minimizing the objective function, a minimum critical value B (ie, bound_table_r[i]) and a set of quantization probabilities Q (ie, pdf_r[i]) can be obtained.
[0488] Exemplarily, the quantization probability group pdf_r[i] may include H values, and H may be determined based on the value range corresponding to the i-th probability distribution.
[0489] Exemplarily, the value range corresponding to the i-th probability distribution is: [-(bound_table_r[i]-1), (bound_table_r[i]-1)]; H is the sum of the number of integers in the value range, the value step size of the integers in the value range is M, and M is a positive integer.
[0490] Among them, the H values in the quantization probability group pdf_r[i] correspond one-to-one to the H integers in the value range.
[0491] For example, if bound_table_r[i] is 1, the value range corresponding to the i-th probability distribution includes one integer, namely 0, and the quantization probability group corresponding to the i-th probability distribution includes one value (which can be a quantization probability or a quantization probability numerator).
[0492] For example, if bound_table_r[i] is 2, the value range corresponding to the i-th probability distribution is [-1, 1]. If M = 1, the value range corresponding to the i-th probability distribution can include 3 integers: -1, 0, 1; the quantization probability group corresponding to the i-th probability distribution includes 3 values. If M = 2, the value range can include 2 integers: -1, 1; the quantization probability group corresponding to the i-th probability distribution includes 2 values.
[0493] It should be noted that in the process of minimizing the objective function, the quantization probability group Q can be restricted:
[0494] (1) The quantization probability of the jth value must be strictly greater than 0;
[0495] (2) The sum of the quantized probabilities of the H values in the value range corresponding to the i-th probability distribution must be equal to 1;
[0496] (3) For the convenience of calculation, the denominator of the quantized probability is usually an integer power of 2.
[0497] (4) The quantization probability of the long-tail symbol (or identification value) is 1 / (integer power of 2).
[0498] According to the above determination, N critical values and N quantized probability groups corresponding to N probability distributions can be calculated. Among them, the relative entropy of n probability distributions among the N probability distributions is the optimal relative entropy; n is an integer between 1 and N, and n is greater than a preset value. The preset value may refer to the number of probability distributions whose relative entropy is the optimal relative entropy among the N probability distributions of the preset information of the prior art.
[0499] Optimally, n=N. That is, the relative entropy of N probability distributions is the optimal relative entropy; in this way, the length of the code stream obtained by entropy coding can be shortened to the greatest extent.
[0500] The following shows that the quantization probability denominator is 256, the quantization probability of the corresponding long-tail symbol (or identification value) in each probability distribution is 1 / 256, N=35, n=N, and the 35 critical values and 35 quantization probability groups corresponding to the 35 probability distributions are as follows:
[0501] There are 35 critical values corresponding to the 35 probability distributions: 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 4, 4, 5, 6, 7, 8, 9, 11, 13, 16, 18, 22, 26, 32, 38, 46, 55, 65, 77, 92, 106, 128, 128, 128, 128.
[0502] Assume that the sorting order of the integers in the value range corresponding to each probability distribution is as follows: 0, -1, 1, -2, 2, ..., -(bound_table_r[i]-1), (bound_table_r[i]-1); then the 35 quantized probability groups corresponding to the 35 probability distributions are as follows:
[0504] The first quantization probability group includes: 255;
[0505] The second quantization probability group includes: 255;
[0506] The third quantization probability group includes: 255;
[0507] The fourth quantization probability group includes: 251, 2, 2;
[0508] The fifth quantization probability group includes: 245, 5, 5;
[0509] The sixth quantized probability group includes: 231, 12, 12;
[0510] The seventh quantization probability group includes: 211, 22, 22;
[0511] The eighth quantized probability group includes: 188, 33, 34;
[0512] The ninth quantization probability group includes: 157, 48, 48, 1, 1;
[0513] The tenth quantization probability group includes: 134, 57, 56, 4, 4;
[0514] The eleventh quantization probability group includes: 111, 61, 61, 10, 10, 1, 1;
[0515] The twelfth quantization probability group includes: 94, 62, 61, 17, 17, 2, 2;
[0516] The thirteenth quantized probability group includes: 77, 58, 58, 24, 24, 6, 6, 1, 1;
[0517] The fourteenth quantization probability group includes: 63, 52, 52, 29, 29, 11, 11, 3, 3, 1, 1;
[0518] The fifteenth quantization probability group includes: 52, 46, 46, 31, 30, 16, 16, 6, 6, 2, 2, 1, 1;
[0519] The sixteenth quantization probability group includes: 43, 39, 39, 30, 30, 19, 19, 10, 10, 5, 5, 2, 2, 1, 1;
[0520] The seventeenth quantization probability group includes: 35, 33, 33, 28, 28, 21, 21, 13, 13, 8, 8, 4, 4, 2, 2, 1, 1;
[0521] The eighteenth quantization probability group includes: 29, 28, 28, 25, 25, 20, 20, 15, 15, 10, 10, 7, 7, 4, 4, 2, 2, 1, 1, 1, 1;
[0522] The nineteenth quantized probability group includes: 24, 23, 23, 21, 21, 19, 18, 15, 15, 12, 12, 9, 9, 6, 6, 4, 4, 3, 3, 2, 2, 1, 1, 1, 1;
[0523] The twentieth quantized probability group includes: 19, 19, 19, 18, 18, 17, 17, 15, 15, 12, 12, 10, 10, 8, 8, 6, 6, 4, 4, 3, 3, 2, 2, 1, 1, 1, 1, 1, 1, 1;
[0524] The twenty-first quantized probability group includes: 17, 16, 16, 16, 16, 15, 15, 13, 13, 12, 12, 10, 10, 9, 9, 7, 7, 6, 6, 4, 4, 3, 3, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1;
[0525] The twenty-second quantized probability group includes: 14, 13, 13, 13, 13, 12, 12, 12, 12, 11, 11, 10, 10, 9, 9, 8, 8, 6, 6, 5, 5, 4, 5, 4, 4, 3, 3, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1;
[0526] The twenty-third quantized probability group includes: 11, 11, 11, 11, 11, 10, 10, 10, 10, 10, 9, 9, 8, 8, 7, 7, 7, 6, 6, 5, 5, 5, 4, 4, 3, 3, 3, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1;
[0527] The twenty-fourth quantized probability group includes: 9,9,9,9,9,9,9,8,8,8,8,8,8,7,7,7,7,6,6,6,6,5,5,5,5,4,4,4,4,4,4,3,3,3,3,2,2,2,2,2,2,2,2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1;
[0528] The twenty-fifth quantized probability group includes: 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 6, 6, 6, 6, 6, 5, 5, 5, 5, 5, 5, 5, 4, 4, 4, 4, 4, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1;
[0529] The twenty-sixth quantization probability group includes: 6, 6, 6, 6, 6, 6, 6, 5, 6, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 4, 4, 4, 4, 4, 4, 4, 4, 4, 3, 3, 3, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1;
[0530] The twenty-seventh quantized probability group includes: 5,5,5,5,5,5,5,5,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,3,3,3,3,3,3,3,3,3,3,3,3,3,3,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1;
[0531] The twenty-eighth quantization probability group includes: 4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2 ,2,2,2,2,2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1;
[0532] The twenty-ninth quantized probability group includes: 3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,1,1,1,1,1,1 , 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1;
[0533] The thirtieth quantization probability group includes: 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1 , 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1;
[0534] The thirty-first quantization probability group includes: 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 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th quantization probability group includes: 1, ... 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1 ,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1 , 1, ....
[0539] For the first, second and third probability distributions:
[0540] The critical values are: 1;
[0541] The integers in the value range are: 0;
[0542] The quantized probability group includes a value: 255;
[0543] That is to say, the integer 0 corresponds to a quantized probability numerator of 255.
[0544] For the fourth probability distribution:
[0545] The critical values are: 2;
[0546] The integers in the value range are: 0, -1, 1;
[0547] The quantized probability group includes three values: 251, 2, 2;
[0548] That is to say, the integer 0 corresponds to a quantized probability numerator of 251; the integer -1 corresponds to a quantized probability numerator of 2; the integer 1 corresponds to a quantized probability numerator of 2.
[0549] And so on, I won’t go into details here.
[0550] According to the above 35 critical values and 35 quantization probability groups, the critical values of the 32nd probability distribution to the 35th probability distribution are the same, and the quantization probability groups are the same; therefore, the 35 probability distributions can be reduced to 32 probability distributions (removing the 33rd to 35th probability distributions), and the 33rd to 35th distributions are all replaced by the 32nd distribution; and the 32 critical values and 32 quantization probability groups corresponding to the 32 probability distributions are used to form the preset information; at this time, N=32.
[0551] The preset information may be expressed in the following form:
[0552] bound_table_r=[1,1,1,2,2,2,2,2,3,3,4,4,5,6,7,8,9,11,13,16,18,22,26,32,38,46,55,65,77,92,106,128]
[0553] pdf_r = [
[255] ,
[255] ,
[255] , [251, 2, 2], [245, 5, 5], [231, 12, 12], [211, 22, 22], [188, 33, 34], [157, 48, 48, 1, 1], [134, 57, 56, 4, 4], [111, 61, 61, 1 0,10,1,1],[94,62,61,17,17,2,2],[77,58,58,24,24,6,6,1,1],[63,52,52,29,29,11,11,3,3,1,1],[52,46,46,31,30,16,16,6,6,2,2,1,1],[43 ,39,39,30,30,19,19,10,10,5,5,2,2,1,1],[35,33,33,28,28,21,21,13,13,8,8,4,4,2,2,1,1],[29,28,28,25,25,20,20,15,15,10,10,7,7,4,4, 2,2,1,1,1,1],[24,23,23,21,21,19,18,15,15,12,12,9,9,6,6,4,4,3,3,2,2,1,1,1,1],[19,19,19,18,18,17,17,15,15,12,12,10,10,8,8,6,6,4 ,4,3,3,2,2,1,1,1,1,1,1,1,1,1,1],[17,16,16,16,16,16,15,15,13,13,12,12,10,10,9,9,7,7,6,6,4,4,3,3,2,2,2,2,1,1,1,1,1,1,1,1,1],[14,13,13,13 ,13,12,12,12,12,11,11,10,10,9,9,8,8,6,6,5,5,4,5,4,4,3,3,2,2,2,2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],[11,11,11,11,11,10,10,10,10,10,10,9, 9,8,8,7,7,7,7,6,6,5,5,5,5,4,4,3,3,3,3,3,2,2,2,2,2,2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],[9,9,9,9,9,9,9,9,8,8,8,8,8,7,7,7,7,6,6,6,6,6,5,5 ,5,5,4,4,4,4,4,4,4,3,3,3,3,3,2,2,2,2,2,2,2,2,2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],[7,7,7,7,7,7,7,7,7,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,4,4,4,4,4,4,3,3,3,3,3,3,2,2,2,2,2,2,2,2,2,2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],[6,6,6,6,6,6,6,6,6,5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,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1 , 1, ...
[0592] Among them, bound_table_r represents an array for storing critical values, bound_table_r[i] represents the critical value corresponding to the i-th probability distribution; pdf_r represents an array for storing quantized probability groups, pdf_r[i] represents the quantized probability group corresponding to the i-th probability distribution, and i is the probability distribution index.
[0593] Another preset message may be as follows:
[0594] bound_table_r=[1,1,2,2,2,2,2,2,3,3,4,5,5,6,8,9,11,13,15,18,21,25,30,36,43,51,60,71,85,100,118,128]
[0596] pdf_r=[
[255] ,
[255] ,[253,1,1],[251,2,2],[245,5,5],[231,12,12],[211,22,22],[188,33,34],[157,48,48,1,1],[134,57,56,4,4],[107,61, 61,12,12,1,1],[89,60,60,19,19,3,3,1,1],[74,56,57,26,26,7,7,1,1],[61,51,51,30,30,12,12,3,3,1,1],[49,44,44,31,31,17,17,7,7,2,2, 1,1,1,1],[41,37,38,30,29,20,20,11,11,5,5,2,2,1,1,1,1,1],[33,32,32,27,27,20,20,14,14,8,8,5,5,2,2,1,1,1,1,1,1],[27,27,26,23,24,20 ,20,15,15,11,11,7,7,4,4,3,3,1,1,1,1,1,1,1,1,1,1],[22,22,21,20,20,18,18,15,15,12,12,9,9,7,7,5,5,3,3,2,2,1,1,1,1,1,1,1,1],[19,18,18 ,17,17,16,16,14,14,12,12,10,10,8,8,6,6,5,5,3,3,2,2,2,2,1,1,1,1,1,1,1,1,1,1,1,1,1],[15,15,15,14,14,13,14,13,12,11,11,10,10,9,9,7,7,6 ,6,5,5,4,4,3,3,2,2,2,2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],[13,12,12,12,12,12,11,11,11,11,10,10,9,9,8,8,8,8,7,7,6,6,5,5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,1,2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, ... ,1 ... 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1 ,1 ...
[0635] In this way, the redundancy of the preset information can be reduced, and the memory occupied by the preset information can be reduced; in addition, the bits required for representing the probability distribution index can also be reduced.
[0636] It should be understood that the present application does not limit the sorting order of the N quantization probability groups, and the present application does not limit the sorting order of the N critical values. The position of the i-th critical value corresponding to the i-th probability distribution in the N critical values is the same as the position of the i-th quantization probability group corresponding to the i-th probability distribution in the N quantization probability groups.
[0637] It should be understood that the present application does not limit the arrangement order of multiple values in any quantization probability group.
[0638] It should be noted that, for the quantized probability group corresponding to the i-th probability distribution, if the c-th value "X1" corresponds to the integer "A" within the value range corresponding to the i-th probability distribution, and the g-th value "X2" corresponds to the integer "-A" within the value range corresponding to the i-th probability distribution, then the c-th value in the quantized probability group corresponding to the i-th probability distribution can be replaced from "X1" to "X2", and the g-th value in the quantized probability group corresponding to the i-th probability distribution can be replaced from "X2" to "X1". c and g are positive integers less than H, and c is not equal to g.
[0639] For example, assuming that the tenth quantization probability group includes: 134, 57, 56, 4, 4; if the integer corresponding to "57" is -1 and the integer corresponding to "56" is "1", the tenth quantization probability group can be updated to: 134, 56, 57, 4, 4.
[0640] It should be understood that N can take other values, for example, N=16; then 16 critical values can be selected from the above 32 critical values, and 16 quantization probability groups corresponding to the above 16 critical values can be selected from the 32 quantization probability groups to form preset information; that is, the present application does not impose any restrictions on the value of N.
[0641] It should be understood that M can be other data, for example, M=1 or 2, and the present application does not limit this.
[0642] It should be understood that the quantization probability denominator corresponding to the quantization probability group can be other data, for example, 512; in this case, the quantization probability numerator in the above 32 quantization probability groups can be doubled to obtain another quantization probability group. In other words, the present application does not restrict the value of the quantization probability denominator corresponding to the quantization probability group.
[0643] The above step of establishing the preset information may be performed by an entropy encoder.
[0644] Figure 8 FIG. 4 is a flowchart of an exemplary entropy coding process. Figure 8 The entropy encoding process in can be performed by an entropy encoder.
[0645] S801, obtaining first data, a probability distribution index of the first data and preset information, wherein the preset information includes N critical values and N quantization probability groups corresponding to N probability distributions, and each of the N probability distributions corresponds to a critical value and a quantization probability group.
[0646] In one possible manner, the first data may be the original data 45 input to the encoder 20 .
[0647] In a possible manner, the first data may be data obtained by processing the original data 45 input to the encoder 20 .
[0648] Exemplarily, the first data may include multiple symbols; for example, a symbol may be a pixel value of a pixel in an image or a characteristic value of a pixel value; for another example, a symbol may be the amplitude of a frequency in an audio frame, and so on.
[0649] S802: Search for a critical value and a quantization probability group corresponding to the first data from preset information according to a probability distribution index of the first data.
[0650] Exemplarily, based on the preset information shown above, assuming that the probability distribution index of the first data is 11, bound_table_r
[11] =4 is searched from the critical value array; and pdf_r
[11] =[134, 57, 56, 4, 4] can be searched from the array of quantization probability groups.
[0651] S803: Perform entropy coding on the first data according to the critical value and the quantization probability group corresponding to the first data.
[0652] Exemplarily, S803 may include the following sub-steps:
[0653] S8031, determine whether the absolute value of the symbol to be entropy coded is less than the critical value corresponding to the symbol to be entropy coded.
[0654] S8032, when the absolute value of the symbol to be entropy coded is greater than or equal to the critical value corresponding to the symbol to be entropy coded, the first entropy coding algorithm is used to entropy encode the symbol to be entropy coded; the symbol to be entropy coded is updated to the mark value; and the second entropy coding algorithm is used to entropy encode the updated symbol to be entropy coded based on the quantization probability group corresponding to the symbol to be entropy coded.
[0655] For example, assuming that the probability distribution index of the symbol to be entropy coded is 11, the critical value corresponding to the symbol to be entropy coded is bound_table_r
[11] =4, and the quantization probability group corresponding to the symbol to be entropy coded is pdf_r
[11] =[134, 57, 56, 4, 4]; if the symbol to be entropy coded is 5, the first entropy coding algorithm can be used to entropy code "5". Then, the symbol to be entropy coded "5" is updated to the mark value (for example, -bound_table_r
[11] =-4). After that, the second entropy coding algorithm can be used to entropy code the updated symbol to be entropy coded "-4" according to the quantization probability group corresponding to the symbol to be entropy coded pdf_r
[11] =[134, 57, 56, 4, 4].
[0656] Exemplarily, the first entropy coding algorithm may be an OUTBOUND algorithm, and the second entropy coding algorithm may be an INBOUND algorithm; it should be understood that the present application does not limit the first entropy coding algorithm and the second entropy coding algorithm.
[0657] S8033, when the absolute value of the symbol to be entropy coded is less than the critical value corresponding to the symbol to be entropy coded, adopt a second entropy coding algorithm to entropy encode the symbol to be entropy coded according to the quantization probability group corresponding to the symbol to be entropy coded.
[0658] For example, assuming that the probability distribution index of the symbol to be entropy coded is 11, the critical value corresponding to the symbol to be entropy coded is bound_table_r
[11] =4, and the quantization probability group corresponding to the symbol to be entropy coded is pdf_r
[11] =[134, 57, 56, 4, 4]; if the symbol to be entropy coded is 3, the second entropy coding algorithm can be used to entropy encode the entropy coded symbol "3" according to the quantization probability group pdf_r
[11] =[134, 57, 56, 4, 4] corresponding to the symbol to be entropy coded.
[0659] Fig. 9 FIG. 4 is a flowchart showing an exemplary entropy decoding process. Fig. 9 The entropy decoding process in can be performed by an entropy decoder.
[0660] S901, receiving a code stream.
[0661] S902, obtaining a probability distribution index and preset information of second data in the code stream, wherein the preset information includes N critical values and N quantization probability groups corresponding to N probability distributions, and each of the N probability distributions corresponds to a critical value and a quantization probability group.
[0662] Exemplarily, the second data in the code stream may be data obtained by performing entropy encoding on the first data as described above.
[0663] S903 , searching for a critical value and a quantization probability group corresponding to the second data from preset information according to the probability distribution index of the second data.
[0664] Exemplarily, S903 may refer to the description of S802 above, which will not be repeated here.
[0665] S904: Perform entropy decoding on the second data according to the critical value corresponding to the first data and the quantization probability group corresponding to the first data.
[0666] Exemplarily, S904 may include the following sub-steps:
[0667] S9041, using a second entropy decoding algorithm to entropy decode the symbol to be entropy decoded based on a quantization probability group corresponding to the symbol to be entropy decoded in the second data, to obtain an entropy decoded symbol;
[0668] S9042, determine whether the entropy decoded symbol is a tag value.
[0669] S9043: When the entropy decoded symbol is a mark value, entropy decoding is performed on the entropy decoded symbol using a first entropy decoding algorithm, and the entropy decoded data is updated to a result of entropy decoding performed using the first entropy decoding algorithm.
[0670] For example, assuming that the probability distribution index of the symbol to be entropy decoded is 11, the critical value corresponding to the second data is bound_table_r
[11] =4, and the quantization probability group corresponding to the second data is pdf_r
[11] =[134, 57, 56, 4, 4]; if the second entropy decoding algorithm is used to entropy decode the symbol to be entropy decoded based on the quantization probability group corresponding to the symbol to be entropy decoded, the entropy decoded symbol is -4. Since "-4" is a mark value, the first entropy decoding algorithm can be used to entropy decode the entropy decoded symbol "-4" to obtain "5".
[0671] The entropy coding and decoding method of the present application and the entropy coding and decoding method of the prior art are tested using the same data, and the results are shown in Table 1 and Table 2:
[0672] Table 1
[0673] Code length loss Prior art entropy coding method 0.6% Entropy coding method of this application 0.5%
[0674] In Table 1, the first row: the average length of the code stream obtained by the entropy coding method of the prior art is 0.6% longer than the theoretical optimum;
[0675] Second row: The average length of the code stream obtained by the entropy coding method of the present application technology is 0.5% longer than the theoretical optimum.
[0676] Referring to Table 1, it can be seen that when entropy encoding is performed on the same data, the length of the code stream obtained by entropy encoding in the present application is smaller.
[0677] Table 2
[0678]
[0679] In Table 2, the code stream length obtained by entropy coding based on the critical value table and quantization probability group of the prior art using Model 1 is 0.67% longer than the theoretical optimum. The code stream length obtained by entropy coding based on the critical value table and quantization probability group of the prior art using Model 2 is 0.62% longer than the theoretical optimum. ... and so on.
[0680] In Table 2, the code stream length obtained by entropy coding based on the critical value table and quantization probability group of the present application using Model 1 is 0.46% longer than the theoretical optimum. The code stream length obtained by entropy coding based on the critical value table and quantization probability group of the present application using Model 2 is 0.40% longer than the theoretical optimum. ... and so on.
[0681] Referring to Table 2, it can be seen that for the same data, no matter which model is used for entropy coding, the length of the code stream obtained by entropy coding in the present application is smaller.
[0682] Fig.10 The entropy coding apparatus can be used to execute the method of the above embodiment, and therefore, the beneficial effects that can be achieved can refer to the beneficial effects of the corresponding method provided above, which will not be repeated here.
[0683] Reference Fig.10 , a device for entropy coding, comprising:
[0684] The first information acquisition module 1001 is used to acquire the first data, the probability distribution index of the first data and the preset information; wherein the preset information includes N critical values and N quantized probability groups corresponding to N probability distributions; each of the N probability distributions corresponds to a critical value and a quantized probability group; the relative entropy of n probability distributions among the N probability distributions is the optimal relative entropy; the relative entropy of the first probability distribution is used to characterize the distance between the reference probability distribution corresponding to the first probability distribution and the first probability distribution, and the first probability distribution is any one of the n probability distributions; N is a positive integer, n is an integer between 1 and N, and n is greater than a preset value; each of the N probability distributions corresponds to a probability distribution index;
[0685] A first information search module 1002, configured to search for a critical value and a quantization probability group corresponding to the first data from preset information according to a probability distribution index of the first data;
[0686] The first entropy coding module 1003 is used to perform entropy coding on the first data according to the critical value and the quantization probability group corresponding to the first data.
[0687] In addition, the apparatus for entropy coding may further include a module for generating preset information.
[0688] Fig.11 The entropy decoding device can be used to execute the method of the above embodiment, so the beneficial effects that can be achieved can refer to the beneficial effects of the corresponding method provided above, which will not be repeated here.
[0689] Reference Fig.11 , a device for entropy decoding, comprising:
[0690] The first code stream receiving module 1101 is used to receive a code stream;
[0691] The second information acquisition module 1102 is used to obtain the probability distribution index and preset information of the second data in the code stream; wherein the preset information includes N critical values and N quantization probability groups corresponding to N probability distributions; each probability distribution in the N probability distributions corresponds to a critical value and a quantization probability group; the relative entropy of n probability distributions in the N probability distributions is the optimal relative entropy; the relative entropy of the first probability distribution is used to characterize the distance between the reference probability distribution corresponding to the first probability distribution and the first probability distribution, and the first probability distribution is any one of the n probability distributions; N is a positive integer, n is an integer between 1 and N, and n is greater than a preset value; each probability distribution in the N probability distributions corresponds to a probability distribution index;
[0692] A second information search module 1103, configured to search for a critical value and a quantization probability group corresponding to the second data from preset information according to a probability distribution index of the second data;
[0693] The first entropy decoding module 1104 is used to perform entropy decoding on the second data according to the critical value and the quantization probability group corresponding to the second data.
[0694] In addition, the apparatus for entropy decoding may further include a module for generating preset information.
[0695] Fig.12 The entropy coding apparatus can be used to execute the method of the above embodiment, and therefore, the beneficial effects that can be achieved can refer to the beneficial effects of the corresponding method provided above, which will not be repeated here.
[0696] Reference Fig.12 , a device for entropy coding, comprising:
[0697] The third information acquisition module 1201 is used to acquire the first data, the probability distribution index of the first data and the preset information; wherein the preset information includes N critical values and N quantization probability groups corresponding to N probability distributions, each of the N probability distributions corresponds to a critical value and a quantization probability group, and N is a positive integer; each of the N probability distributions corresponds to a probability distribution index;
[0698] A third information search module 1202, configured to search for a critical value and a quantization probability group corresponding to the first data from preset information according to a probability distribution index of the first data;
[0699] A second entropy coding module 1203, configured to perform entropy coding on the first data according to a critical value and a quantization probability group corresponding to the first data;
[0700] Among them, the first critical value is: 2;
[0701] The second critical value is: 2;
[0702] The third critical value is: 2;
[0703] The fourth critical value is: 2;
[0704] The fifth critical value is: 2;
[0705] The sixth critical value is: 3;
[0706] The seventh critical value is: 3;
[0707] The first quantization probability group includes: 251, 2, 2;
[0708] The second quantized probability group includes: 245, 5, 5;
[0709] The third quantized probability group includes: 231, 12, 12;
[0710] The fourth quantization probability group includes: 211, 22, 22;
[0711] The fifth quantized probability group includes: 188, 33, 34;
[0712] The sixth quantization probability group includes: 157, 48, 48, 1, 1;
[0713] The seventh quantization probability group includes: 134, 57, 56, 4, 4.
[0714] In addition, the apparatus for entropy coding may further include a module for generating preset information.
[0715] Fig.13 The entropy decoding device can be used to execute the method of the above embodiment, so the beneficial effects that can be achieved can refer to the beneficial effects of the corresponding method provided above, which will not be repeated here.
[0716] Reference Fig.13 , a device for entropy decoding, comprising:
[0717] The second code stream receiving module 1301 is used to receive a code stream;
[0718] The fourth information acquisition module 1302 is used to obtain a probability distribution index and preset information of the second data in the bitstream; wherein the preset information includes N critical values and N quantization probability groups corresponding to N probability distributions, each of the N probability distributions corresponds to a critical value and a quantization probability group, and N is a positive integer; each of the N probability distributions corresponds to a probability distribution index;
[0719] The fourth information search module 1303 is used to search for a critical value and a quantization probability group corresponding to the second data from preset information according to the probability distribution index of the second data;
[0720] A second entropy decoding module 1304, configured to perform entropy decoding on the second data according to a critical value and a quantization probability group corresponding to the second data;
[0721] Among them, the first critical value is: 2;
[0722] The second critical value is: 2;
[0723] The third critical value is: 2;
[0724] The fourth critical value is: 2;
[0725] The fifth critical value is: 2;
[0726] The sixth critical value is: 3;
[0727] The seventh critical value is: 3;
[0728] The first quantization probability group includes: 251, 2, 2;
[0729] The second quantized probability group includes: 245, 5, 5;
[0730] The third quantized probability group includes: 231, 12, 12;
[0731] The fourth quantization probability group includes: 211, 22, 22;
[0732] The fifth quantized probability group includes: 188, 33, 34;
[0733] The sixth quantization probability group includes: 157, 48, 48, 1, 1;
[0734] The seventh quantization probability group includes: 134, 57, 56, 4, 4.
[0735] In addition, the apparatus for entropy decoding may further include a module for generating preset information.
[0736] In one example, Fig.14 A schematic block diagram of a device 1400 according to an embodiment of the present application is shown. The device 1400 may include: a processor 1401 and a transceiver / transceiver pin 1402 , and optionally, a memory 1403 .
[0737] The components of the device 1400 are coupled together via a bus 1404, wherein the bus 1404 includes a power bus, a control bus, and a status signal bus in addition to a data bus. However, for the sake of clarity, all buses are referred to as bus 1404 in the figure.
[0738] Optionally, the memory 1403 may be used to store instructions in the aforementioned method embodiment. The processor 1401 may be used to execute the instructions in the memory 1403, and control the receiving pin to receive a signal, and control the sending pin to send a signal.
[0739] The apparatus 1400 may be the electronic device or a chip of the electronic device in the above method embodiment.
[0740] Among them, all relevant contents of each step involved in the above method embodiment can be referred to the functional description of the corresponding functional module, and will not be repeated here.
[0741] The embodiment of the present application also provides a chip, including one or more interface circuits and one or more processors; the one or more processors receive or send data through the one or more interface circuits, and when the one or more processors execute computer instructions, the above-mentioned related method steps implement the steps of the method in the above-mentioned embodiment. The interface circuit is a transceiver / transceiver pin 1402.
[0742] This embodiment further provides a computer-readable storage medium, in which computer instructions are stored. When the computer instructions are executed on an electronic device, the electronic device executes the above-mentioned related method steps to implement the method in the above-mentioned embodiment.
[0743] This embodiment further provides a computer program product, which includes computer instructions. When the computer instructions are executed by a computer or a processor, the computer executes the above-mentioned related steps to implement the method in the above-mentioned embodiment.
[0744] In addition, an embodiment of the present application also provides a device, which may specifically be a chip, component or module, and the device may include a connected processor and memory; wherein the memory is used to store computer-executable instructions, and when the device is running, the processor may execute the computer-executable instructions stored in the memory so that the chip executes the methods in the above-mentioned method embodiments.
[0745] Among them, the electronic device, computer-readable storage medium, computer program product or chip provided in this embodiment are all used to execute the corresponding methods provided above. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects in the corresponding methods provided above and will not be repeated here.
[0746] Through the description of the above implementation methods, technical personnel in the relevant field can understand that for the convenience and simplicity of description, only the division of the above-mentioned functional modules is used as an example. In actual applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.
[0747] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of modules or units is only a logical function division, and there may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0748] The units described as separate components may or may not be physically separated, and the components shown as units may be one physical unit or multiple physical units, that is, they may be located in one place or distributed in multiple different places. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0749] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0750] Any content of each embodiment of the present application, as well as any content of the same embodiment, can be freely combined. Any combination of the above content is within the scope of the present application.
[0751] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on this understanding, the technical solution of the embodiment of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium, including several instructions to enable a device (which can be a single-chip microcomputer, chip, etc.) or a processor (processor) to perform all or part of the steps of the various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read only memory (ROM), random access memory (RAM), disk or optical disk and other media that can store program code.
[0752] The steps of the method or algorithm described in conjunction with the disclosure of the embodiments of the present application can be implemented in a hardware manner, or can be implemented by a processor executing a software instruction. The software instruction can be composed of corresponding software modules, and the software module can be stored in a random access memory (Random Access Memory, RAM), a flash memory, a read-only memory (ReadOnly Memory, ROM), an erasable programmable read-only memory (Erasable Programmable ROM, EPROM), an electrically erasable programmable read-only memory (Electrically EPROM, EEPROM), a register, a hard disk, a mobile hard disk, a read-only compact disk (CD-ROM) or any other form of storage medium known in the art. An exemplary storage medium is coupled to a processor so that the processor can read information from the storage medium and can write information to the storage medium. Of course, the storage medium can also be a component of the processor. The processor and the storage medium can be located in an ASIC.
[0753] Those skilled in the art should be aware that in one or more of the above examples, the functions described in the embodiments of the present application can be implemented with hardware, software, firmware, or any combination thereof. When implemented using software, these functions can be stored in a computer-readable medium or transmitted as one or more instructions or codes on a computer-readable medium. Computer-readable media include computer-readable storage media and communication media, wherein the communication media include any media that facilitates the transmission of a computer program from one place to another. The storage medium can be any available medium that a general or special-purpose computer can access.
[0754] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present application, ordinary technicians in this field can also make many forms without departing from the purpose of the present application and the scope of protection of the claims, all of which are within the protection of the present application.
Claims
1. An entropy coding method, characterized in that: The method comprises: Obtain first data, a probability distribution index of the first data and preset information; wherein the preset information includes N critical values and N quantization probability groups corresponding to N probability distributions; each of the N probability distributions corresponds to a critical value and a quantization probability group; the relative entropy of n probability distributions among the N probability distributions is the optimal relative entropy; wherein the relative entropy of the first probability distribution is used to characterize the distance between a reference probability distribution corresponding to the first probability distribution and the first probability distribution, and the first probability distribution is any one of the n probability distributions; N is a positive integer, n is an integer between 1 and N, and n is greater than a preset value; each of the N probability distributions corresponds to a probability distribution index; According to the probability distribution index of the first data, searching the preset information for a critical value and a quantization probability group corresponding to the first data; The first data is entropy encoded according to a critical value and a quantization probability group corresponding to the first data.
2. The method according to claim 1, characterized in that: The preset information is calculated based on the type of the reference probability distribution with the goal of minimizing the relative entropy.
3. The method according to claim 2, characterized in that The type of the reference probability distribution is a Gaussian probability distribution type.
4. The method according to any one of claims 1 to 3, characterized in that: n=N.
5. The method according to any one of claims 1 to 4, characterized in that: N=32。 6. The method according to any one of claims 1 to 5, characterized in that: The quantization probability group corresponding to the second probability distribution includes H values, where H is determined according to the critical value corresponding to the second probability distribution, H is a positive integer, and the second probability distribution is any one of the N probability distributions.
7. The method according to claim 6, characterized in that The value range corresponding to the second probability distribution is [-(bound_table_r[i]-1), (bound_table_r[i]-1)], H is the sum of the number of integers in the value range, the value step length of the integers in the value range is M, and M is a positive integer; Among them, bound_table_r[i] is the critical value corresponding to the second probability distribution, i is the probability distribution index of the second probability distribution, and i is a positive integer.
8. The method according to claim 6 or 7, characterized in that: The H numerical values are H quantized probability numerators.
9. The method according to claim 8, characterized in that The quantization probability denominator corresponding to the quantization probability numerator is an integer power of 2.
10. The method according to claim 9, characterized in that The quantization probability denominator is 256, and the quantization probability of the corresponding mark value of each probability distribution in the N probability distributions is 1 / 256.
11. The method according to any one of claims 1 to 10, characterized in that: Some of the N critical values are: 2, 2, 2, 2, 2, 3, 3.
12. The method according to any one of claims 1 to 11, characterized in that: The first quantization probability group includes: 251, 2, 2; The second quantized probability group includes: 245, 5, 5; The third quantized probability group includes: 231, 12, 12; The fourth quantization probability group includes: 211, 22, 22; The fifth quantized probability group includes: 188, 33, 34; The sixth quantization probability group includes: 157, 48, 48, 1, 1; The seventh quantization probability group includes: 134, 57, 56, 4, 4.
13. The method according to any one of claims 1 to 10, characterized in that: When N=32, n=N, the N critical values are: 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 4, 4, 5, 6, 7, 8, 9, 11, 13, 16, 18, 22, 26, 32, 38, 46, 55, 65, 77, 92, 106, 128 respectively.
14. The method according to any one of claims 1 to 11 or 13, characterized in that: When N=32, n=N, The first quantization probability group includes: 255; The second quantization probability group includes: 255; The third quantization probability group includes: 255; The fourth quantization probability group includes: 251, 2, 2; The fifth quantization probability group includes: 245, 5, 5; The sixth quantized probability group includes: 231, 12, 12; The seventh quantization probability group includes: 211, 22, 22; The eighth quantized probability group includes: 188, 33, 34; The ninth quantization probability group includes: 157, 48, 48, 1, 1; The tenth quantization probability group includes: 134, 57, 56, 4, 4; The eleventh quantization probability group includes: 111, 61, 61, 10, 10, 1, 1; The twelfth quantization probability group includes: 94, 62, 61, 17, 17, 2, 2; The thirteenth quantized probability group includes: 77, 58, 58, 24, 24, 6, 6, 1, 1; The fourteenth quantization probability group includes: 63, 52, 52, 29, 29, 11, 11, 3, 3, 1, 1; The fifteenth quantization probability group includes: 52, 46, 46, 31, 30, 16, 16, 6, 6, 2, 2, 1, 1; The sixteenth quantization probability group includes: 43, 39, 39, 30, 30, 19, 19, 10, 10, 5, 5, 2, 2, 1, 1; The seventeenth quantization probability group includes: 35, 33, 33, 28, 28, 21, 21, 13, 13, 8, 8, 4, 4, 2, 2, 1, 1; The eighteenth quantization probability group includes: 29, 28, 28, 25, 25, 20, 20, 15, 15, 10, 10, 7, 7, 4, 4, 2, 2, 1, 1, 1, 1; The nineteenth quantized probability group includes: 24, 23, 23, 21, 21, 19, 18, 15, 15, 12, 12, 9, 9, 6, 6, 4, 4, 3, 3, 2, 2, 1, 1, 1, 1; The twentieth quantized probability group includes: 19, 19, 19, 18, 18, 17, 17, 15, 15, 12, 12, 10, 10, 8, 8, 6, 6, 4, 4, 3, 3, 2, 2, 1, 1, 1, 1, 1, 1, 1; The twenty-first quantized probability group includes: 17, 16, 16, 16, 16, 15, 15, 13, 13, 12, 12, 10, 10, 9, 9, 7, 7, 6, 6, 4, 4, 3, 3, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1; The twenty-second quantized probability group includes: 14, 13, 13, 13, 13, 12, 12, 12, 12, 11, 11, 10, 10, 9, 9, 8, 8, 6, 6, 5, 5, 4, 5, 4, 4, 3, 3, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1; The twenty-third quantized probability group includes: 11, 11, 11, 11, 11, 10, 10, 10, 10, 10, 9, 9, 8, 8, 7, 7, 7, 6, 6, 5, 5, 5, 4, 4, 3, 3, 3, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1; The twenty-fourth quantized probability group includes: 9,9,9,9,9,9,9,8,8,8,8,8,8,7,7,7,7,6,6,6,6,5,5,5,5,4,4,4,4,4,4,3,3,3,3,2,2,2,2,2,2,2,2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1; The twenty-fifth quantized probability group includes: 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 6, 6, 6, 6, 6, 5, 5, 5, 5, 5, 5, 5, 4, 4, 4, 4, 4, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1; The twenty-sixth quantization probability group includes: 6, 6, 6, 6, 6, 6, 6, 5, 6, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 4, 4, 4, 4, 4, 4, 4, 4, 4, 3, 3, 3, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1; The twenty-seventh quantized probability group includes: 5,5,5,5,5,5,5,5,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,3,3,3,3,3,3,3,3,3,3,3,3,3,3,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1; The twenty-eighth quantization probability group includes: 4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2 ,2,2,2,2,2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1; The twenty-ninth quantized probability group includes: 3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,1,1,1,1,1,1 , 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,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1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1; The thirty-second quantization probability group includes: 1, ... 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1 ,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1 , 1, ....
15. An entropy decoding method, characterized in that: The method comprises: Receive code stream; Obtain a probability distribution index and preset information of the second data in the code stream; wherein the preset information includes N critical values and N quantization probability groups corresponding to N probability distributions; each of the N probability distributions corresponds to a critical value and a quantization probability group; the relative entropy of n probability distributions in the N probability distributions is the optimal relative entropy; wherein the relative entropy of the first probability distribution is used to characterize the distance between a reference probability distribution corresponding to the first probability distribution and the first probability distribution, and the first probability distribution is any one of the n probability distributions; N is a positive integer, n is an integer between 1 and N, and n is greater than a preset value; each of the N probability distributions corresponds to a probability distribution index; According to the probability distribution index of the second data, searching the preset information for a critical value and a quantization probability group corresponding to the second data; The second data is entropy decoded according to the critical value and the quantization probability group corresponding to the second data.
16. The method according to claim 15, characterized in that The preset information is calculated based on the type of the reference probability distribution with the goal of minimizing the relative entropy.
17. The method according to claim 16, characterized in that The type of the reference probability distribution is a Gaussian probability distribution type.
18. The method according to any one of claims 15 to 17, characterized in that n=N.
19. The method according to any one of claims 15 to 18, characterized in that N=32。 20. The method according to any one of claims 15 to 19, characterized in that The quantization probability group corresponding to the second probability distribution includes H values, where H is determined according to the critical value corresponding to the second probability distribution, H is a positive integer, and the second probability distribution is any one of the N probability distributions.
21. The method according to claim 20, characterized in that The value range corresponding to the second probability distribution is [-(bound_table_r[i]-1), (bound_table_r[i]-1)], H is the sum of the number of integers in the value range, the value step length of the integers in the value range is M, and M is a positive integer; Among them, bound_table_r[i] is the critical value corresponding to the second probability distribution, i is the probability distribution index of the second probability distribution, and i is a positive integer.
22. The method according to claim 20 or 21, characterized in that The H numerical values are H quantized probability numerators.
23. The method according to claim 22, characterized in that The quantization probability denominator corresponding to the quantization probability numerator is an integer power of 2.
24. The method according to claim 23, characterized in that The quantization probability denominator is 256, and the quantization probability of the corresponding mark value of each probability distribution in the N probability distributions is 1 / 256.
25. The method according to any one of claims 15 to 24, characterized in that Some of the N critical values are: 2, 2, 2, 2, 2, 3, 3.
26. The method according to any one of claims 15 to 25, characterized in that The first quantization probability group includes: 251, 2, 2; The second quantized probability group includes: 245, 5, 5; The third quantized probability group includes: 231, 12, 12; The fourth quantization probability group includes: 211, 22, 22; The fifth quantized probability group includes: 188, 33, 34; The sixth quantization probability group includes: 157, 48, 48, 1, 1; The seventh quantization probability group includes: 134, 57, 56, 4, 4.
27. The method according to any one of claims 15 to 24, characterized in that When N=32, n=N, the N critical values are: 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 4, 4, 5, 6, 7, 8, 9, 11, 13, 16, 18, 22, 26, 32, 38, 46, 55, 65, 77, 92, 106, 128 respectively.
28. The method according to any one of claims 15 to 25 or 27, characterized in that When N=32, n=N, The first quantization probability group includes: 255; The second quantization probability group includes: 255; The third quantization probability group includes: 255; The fourth quantization probability group includes: 251, 2, 2; The fifth quantization probability group includes: 245, 5, 5; The sixth quantized probability group includes: 231, 12, 12; The seventh quantization probability group includes: 211, 22, 22; The eighth quantized probability group includes: 188, 33, 34; The ninth quantization probability group includes: 157, 48, 48, 1, 1; The tenth quantization probability group includes: 134, 57, 56, 4, 4; The eleventh quantization probability group includes: 111, 61, 61, 10, 10, 1, 1; The twelfth quantization probability group includes: 94, 62, 61, 17, 17, 2, 2; The thirteenth quantized probability group includes: 77, 58, 58, 24, 24, 6, 6, 1, 1; The fourteenth quantization probability group includes: 63, 52, 52, 29, 29, 11, 11, 3, 3, 1, 1; The fifteenth quantization probability group includes: 52, 46, 46, 31, 30, 16, 16, 6, 6, 2, 2, 1, 1; The sixteenth quantization probability group includes: 43, 39, 39, 30, 30, 19, 19, 10, 10, 5, 5, 2, 2, 1, 1; The seventeenth quantization probability group includes: 35, 33, 33, 28, 28, 21, 21, 13, 13, 8, 8, 4, 4, 2, 2, 1, 1; The eighteenth quantization probability group includes: 29, 28, 28, 25, 25, 20, 20, 15, 15, 10, 10, 7, 7, 4, 4, 2, 2, 1, 1, 1, 1; The nineteenth quantized probability group includes: 24, 23, 23, 21, 21, 19, 18, 15, 15, 12, 12, 9, 9, 6, 6, 4, 4, 3, 3, 2, 2, 1, 1, 1, 1; The twentieth quantized probability group includes: 19, 19, 19, 18, 18, 17, 17, 15, 15, 12, 12, 10, 10, 8, 8, 6, 6, 4, 4, 3, 3, 2, 2, 1, 1, 1, 1, 1, 1, 1; The twenty-first quantized probability group includes: 17, 16, 16, 16, 16, 15, 15, 13, 13, 12, 12, 10, 10, 9, 9, 7, 7, 6, 6, 4, 4, 3, 3, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1; The twenty-second quantized probability group includes: 14, 13, 13, 13, 13, 12, 12, 12, 12, 11, 11, 10, 10, 9, 9, 8, 8, 6, 6, 5, 5, 4, 5, 4, 4, 3, 3, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1; The twenty-third quantized probability group includes: 11, 11, 11, 11, 11, 10, 10, 10, 10, 10, 9, 9, 8, 8, 7, 7, 7, 6, 6, 5, 5, 5, 4, 4, 3, 3, 3, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1; The twenty-fourth quantized probability group includes: 9,9,9,9,9,9,9,8,8,8,8,8,8,7,7,7,7,6,6,6,6,5,5,5,5,4,4,4,4,4,4,3,3,3,3,2,2,2,2,2,2,2,2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1; The twenty-fifth quantized probability group includes: 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 6, 6, 6, 6, 6, 5, 5, 5, 5, 5, 5, 5, 4, 4, 4, 4, 4, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1; The twenty-sixth quantization probability group includes: 6, 6, 6, 6, 6, 6, 6, 5, 6, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 4, 4, 4, 4, 4, 4, 4, 4, 4, 3, 3, 3, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1; The twenty-seventh quantized probability group includes: 5,5,5,5,5,5,5,5,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,3,3,3,3,3,3,3,3,3,3,3,3,3,3,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1; The twenty-eighth quantization probability group includes: 4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2 ,2,2,2,2,2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1; The twenty-ninth quantized probability group includes: 3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,1,1,1,1,1,1 , 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1; The thirtieth quantization probability group includes: 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1 , 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1; The thirty-first quantization probability group includes: 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1 ... , 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1; The thirty-second quantization probability group includes: 1, ... 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1 ,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1 , 1, ....
29. An entropy coding method, characterized in that The method comprises: Acquire first data, a probability distribution index of the first data, and preset information; wherein the preset information includes N critical values and N quantization probability groups corresponding to N probability distributions, each of the N probability distributions corresponds to a critical value and a quantization probability group, and N is a positive integer; each of the N probability distributions corresponds to a probability distribution index; According to the probability distribution index of the first data, searching the preset information for a critical value and a quantization probability group corresponding to the first data; According to the critical value and quantization probability group corresponding to the first data, entropy coding is performed on the first data; wherein, The first critical value is: 2; The second critical value is: 2; The third critical value is: 2; The fourth critical value is: 2; The fifth critical value is: 2; The sixth critical value is: 3; The seventh critical value is: 3; The first quantization probability group includes: 251, 2, 2; The second quantized probability group includes: 245, 5, 5; The third quantized probability group includes: 231, 12, 12; The fourth quantization probability group includes: 211, 22, 22; The fifth quantized probability group includes: 188, 33, 34; The sixth quantization probability group includes: 157, 48, 48, 1, 1; The seventh quantization probability group includes: 134, 57, 56, 4, 4.
30. The method according to claim 29, characterized in that When N=32, The eighth critical value is: 1; The ninth critical value is: 1; The tenth critical value is: 1; The eleventh critical value is: 4; The twelfth critical value is: 4; The thirteenth critical value is: 5; The fourteenth critical value is: 6; The fifteenth critical value is: 7; The sixteenth critical value is: 8; The seventeenth critical value is: 9; The eighteenth critical value is: 11; The 19th critical value is: 13; The 20th critical value is: 16; The 21st critical value is: 18; The 22nd critical value is: 22; The 23rd critical value is: 26; The twenty-fourth critical value is: 32; The 25th critical value is: 38; The twenty-sixth critical value is: 46; The 27th critical value is: 55; The 28th critical value is: 65; The 29th critical value is: 77; The 30th critical value is: 92; The 31st critical value is: 106 The thirty-second critical value is:
128.
31. The method according to claim 29 or 30, characterized in that When N=32, The eighth quantization probability group includes: 255; The ninth quantization probability group includes: 255; The tenth quantization probability group includes: 255; The eleventh quantization probability group includes: 111, 61, 61, 10, 10, 1, 1; The twelfth quantization probability group includes: 94, 62, 61, 17, 17, 2, 2; The thirteenth quantized probability group includes: 77, 58, 58, 24, 24, 6, 6, 1, 1; The fourteenth quantization probability group includes: 63, 52, 52, 29, 29, 11, 11, 3, 3, 1, 1; The fifteenth quantization probability group includes: 52, 46, 46, 31, 30, 16, 16, 6, 6, 2, 2, 1, 1; The sixteenth quantization probability group includes: 43, 39, 39, 30, 30, 19, 19, 10, 10, 5, 5, 2, 2, 1, 1; The seventeenth quantization probability group includes: 35, 33, 33, 28, 28, 21, 21, 13, 13, 8, 8, 4, 4, 2, 2, 1, 1; The eighteenth quantization probability group includes: 29, 28, 28, 25, 25, 20, 20, 15, 15, 10, 10, 7, 7, 4, 4, 2, 2, 1, 1, 1, 1; The nineteenth quantized probability group includes: 24, 23, 23, 21, 21, 19, 18, 15, 15, 12, 12, 9, 9, 6, 6, 4, 4, 3, 3, 2, 2, 1, 1, 1, 1; The twentieth quantized probability group includes: 19, 19, 19, 18, 18, 17, 17, 15, 15, 12, 12, 10, 10, 8, 8, 6, 6, 4, 4, 3, 3, 2, 2, 1, 1, 1, 1, 1, 1, 1; The twenty-first quantized probability group includes: 17, 16, 16, 16, 16, 15, 15, 13, 13, 12, 12, 10, 10, 9, 9, 7, 7, 6, 6, 4, 4, 3, 3, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1; The twenty-second quantized probability group includes: 14, 13, 13, 13, 13, 12, 12, 12, 12, 11, 11, 10, 10, 9, 9, 8, 8, 6, 6, 5, 5, 4, 5, 4, 4, 3, 3, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1; The twenty-third quantized probability group includes: 11, 11, 11, 11, 11, 10, 10, 10, 10, 10, 9, 9, 8, 8, 7, 7, 7, 6, 6, 5, 5, 5, 4, 4, 3, 3, 3, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1; The twenty-fourth quantized probability group includes: 9,9,9,9,9,9,9,8,8,8,8,8,8,7,7,7,7,6,6,6,6,5,5,5,5,4,4,4,4,4,4,3,3,3,3,2,2,2,2,2,2,2,2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1; The twenty-fifth quantized probability group includes: 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 6, 6, 6, 6, 6, 5, 5, 5, 5, 5, 5, 5, 4, 4, 4, 4, 4, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1; The twenty-sixth quantization probability group includes: 6, 6, 6, 6, 6, 6, 6, 5, 6, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 4, 4, 4, 4, 4, 4, 4, 4, 4, 3, 3, 3, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1; The twenty-seventh quantized probability group includes: 5,5,5,5,5,5,5,5,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,3,3,3,3,3,3,3,3,3,3,3,3,3,3,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1; The twenty-eighth quantization probability group includes: 4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2 ,2,2,2,2,2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1; The twenty-ninth quantized probability group includes: 3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,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1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1; The thirty-second quantization probability group includes: 1, ... 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1 ,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1 , 1, ....
32. An entropy decoding method, characterized in that: The method comprises: Receive code stream; Obtaining a probability distribution index and preset information of the second data in the bitstream; wherein the preset information includes N critical values and N quantization probability groups corresponding to N probability distributions, each of the N probability distributions corresponds to a critical value and a quantization probability group, and N is a positive integer; each of the N probability distributions corresponds to a probability distribution index; According to the probability distribution index of the second data, searching the preset information for a critical value and a quantization probability group corresponding to the second data; According to the critical value and the quantization probability group corresponding to the second data, entropy decoding is performed on the second data; wherein the first critical value is: 2; The second critical value is: 2; The third critical value is: 2; The fourth critical value is: 2; The fifth critical value is: 2; The sixth critical value is: 3; The seventh critical value is: 3; The first quantization probability group includes: 251, 2, 2; The second quantized probability group includes: 245, 5, 5; The third quantized probability group includes: 231, 12, 12; The fourth quantization probability group includes: 211, 22, 22; The fifth quantized probability group includes: 188, 33, 34; The sixth quantization probability group includes: 157, 48, 48, 1, 1; The seventh quantization probability group includes: 134, 57, 56, 4, 4.
33. The method according to claim 32, characterized in that When N=32, The eighth critical value is: 1; The ninth critical value is: 1; The tenth critical value is: 1; The eleventh critical value is: 4; The twelfth critical value is: 4; The thirteenth critical value is: 5; The fourteenth critical value is: 6; The fifteenth critical value is: 7; The sixteenth critical value is: 8; The seventeenth critical value is: 9; The eighteenth critical value is: 11; The 19th critical value is: 13; The 20th critical value is: 16; The 21st critical value is: 18; The 22nd critical value is: 22; The 23rd critical value is: 26; The twenty-fourth critical value is: 32; The 25th critical value is: 38; The twenty-sixth critical value is: 46; The 27th critical value is: 55; The 28th critical value is: 65; The 29th critical value is: 77; The 30th critical value is: 92; The thirty-first critical value is: 106; The thirty-second critical value is:
128.
34. The method according to claim 32 or 33, characterized in that When N=32, The eighth quantization probability group includes: 255; The ninth quantization probability group includes: 255; The tenth quantization probability group includes: 255; The eleventh quantization probability group includes: 111, 61, 61, 10, 10, 1, 1; The twelfth quantization probability group includes: 94, 62, 61, 17, 17, 2, 2; The thirteenth quantized probability group includes: 77, 58, 58, 24, 24, 6, 6, 1, 1; The fourteenth quantization probability group includes: 63, 52, 52, 29, 29, 11, 11, 3, 3, 1, 1; The fifteenth quantization probability group includes: 52, 46, 46, 31, 30, 16, 16, 6, 6, 2, 2, 1, 1; The sixteenth quantization probability group includes: 43, 39, 39, 30, 30, 19, 19, 10, 10, 5, 5, 2, 2, 1, 1; The seventeenth quantization probability group includes: 35, 33, 33, 28, 28, 21, 21, 13, 13, 8, 8, 4, 4, 2, 2, 1, 1; The eighteenth quantization probability group includes: 29, 28, 28, 25, 25, 20, 20, 15, 15, 10, 10, 7, 7, 4, 4, 2, 2, 1, 1, 1, 1; The nineteenth quantized probability group includes: 24, 23, 23, 21, 21, 19, 18, 15, 15, 12, 12, 9, 9, 6, 6, 4, 4, 3, 3, 2, 2, 1, 1, 1, 1; The twentieth quantized probability group includes: 19, 19, 19, 18, 18, 17, 17, 15, 15, 12, 12, 10, 10, 8, 8, 6, 6, 4, 4, 3, 3, 2, 2, 1, 1, 1, 1, 1, 1, 1; The twenty-first quantized probability group includes: 17, 16, 16, 16, 16, 15, 15, 13, 13, 12, 12, 10, 10, 9, 9, 7, 7, 6, 6, 4, 4, 3, 3, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1; The twenty-second quantized probability group includes: 14, 13, 13, 13, 13, 12, 12, 12, 12, 11, 11, 10, 10, 9, 9, 8, 8, 6, 6, 5, 5, 4, 5, 4, 4, 3, 3, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1; The twenty-third quantized probability group includes: 11, 11, 11, 11, 11, 10, 10, 10, 10, 10, 9, 9, 8, 8, 7, 7, 7, 6, 6, 5, 5, 5, 4, 4, 3, 3, 3, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1; The twenty-fourth quantized probability group includes: 9,9,9,9,9,9,9,8,8,8,8,8,8,7,7,7,7,6,6,6,6,5,5,5,5,4,4,4,4,4,4,3,3,3,3,2,2,2,2,2,2,2,2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1; The twenty-fifth quantized probability group includes: 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 6, 6, 6, 6, 6, 5, 5, 5, 5, 5, 5, 5, 4, 4, 4, 4, 4, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1; The twenty-sixth quantization probability group includes: 6, 6, 6, 6, 6, 6, 6, 5, 6, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 4, 4, 4, 4, 4, 4, 4, 4, 4, 3, 3, 3, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1; The twenty-seventh quantized probability group includes: 5,5,5,5,5,5,5,5,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,3,3,3,3,3,3,3,3,3,3,3,3,3,3,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1; The twenty-eighth quantization probability group includes: 4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2 ,2,2,2,2,2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1; The twenty-ninth quantized probability group includes: 3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,1,1,1,1,1,1 , 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1; The thirtieth quantization probability group includes: 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1 , 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1; The thirty-first quantization probability group includes: 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1 ... , 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1; The thirty-second quantization probability group includes: 1, ... 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1 ,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1 , 1, ....
35. A device for entropy coding, characterized in that include: A first information acquisition module, used to acquire first data, a probability distribution index of the first data and preset information; wherein the preset information includes N critical values and N quantized probability groups corresponding to N probability distributions; each of the N probability distributions corresponds to a critical value and a quantized probability group; the relative entropy of n probability distributions among the N probability distributions is the optimal relative entropy; wherein the relative entropy of the first probability distribution is used to characterize the distance between a reference probability distribution corresponding to the first probability distribution and the first probability distribution, and the first probability distribution is any one of the n probability distributions; N is a positive integer, n is an integer between 1 and N, and n is greater than a preset value; each of the N probability distributions corresponds to a probability distribution index; A first information search module, configured to search the preset information for a critical value and a quantization probability group corresponding to the first data according to a probability distribution index of the first data; The first entropy coding module is used to perform entropy coding on the first data according to a critical value and a quantization probability group corresponding to the first data.
36. A device for entropy decoding, characterized in that include: A first code stream receiving module, used for receiving a code stream; A second information acquisition module is used to obtain a probability distribution index and preset information of the second data in the code stream; wherein the preset information includes N critical values and N quantization probability groups corresponding to N probability distributions; each of the N probability distributions corresponds to a critical value and a quantization probability group; the relative entropy of n probability distributions in the N probability distributions is the optimal relative entropy; wherein the relative entropy of the first probability distribution in the n probability distributions is used to characterize the distance between the reference probability distribution corresponding to the first probability distribution and the first probability distribution, and the first probability distribution is any one of the n probability distributions; N is a positive integer, n is an integer between 1 and N, and n is greater than a preset value; each of the N probability distributions corresponds to a probability distribution index; A second information search module, configured to search the preset information for a critical value and a quantization probability group corresponding to the second data according to a probability distribution index of the second data; The first entropy decoding module is used to perform entropy decoding on the second data according to the critical value and the quantization probability group corresponding to the second data.
37. A device for entropy coding, characterized in that include: A third information acquisition module is used to acquire first data, a probability distribution index of the first data, and preset information; wherein the preset information includes N critical values and N quantization probability groups corresponding to N probability distributions, each of the N probability distributions corresponds to a critical value and a quantization probability group, and N is a positive integer; each of the N probability distributions corresponds to a probability distribution index; A third information search module, configured to search the preset information for a critical value and a quantization probability group corresponding to the first data according to a probability distribution index of the first data; The second entropy coding module is used to perform entropy coding on the first data according to the critical value and quantization probability group corresponding to the first data; wherein, The first critical value is: 2; The second critical value is: 2; The third critical value is: 2; The fourth critical value is: 2; The fifth critical value is: 2; The sixth critical value is: 3; The seventh critical value is: 3; The first quantization probability group includes: 251, 2, 2; The second quantized probability group includes: 245, 5, 5; The third quantized probability group includes: 231, 12, 12; The fourth quantization probability group includes: 211, 22, 22; The fifth quantized probability group includes: 188, 33, 34; The sixth quantization probability group includes: 157, 48, 48, 1, 1; The seventh quantization probability group includes: 134, 57, 56, 4, 4.
38. A device for entropy decoding, characterized in that include: A second code stream receiving module, used for receiving a code stream; A fourth information acquisition module, used to obtain a probability distribution index and preset information of the second data in the bitstream; wherein the preset information includes N critical values and N quantization probability groups corresponding to N probability distributions, each of the N probability distributions corresponds to a critical value and a quantization probability group, and N is a positive integer; each of the N probability distributions corresponds to a probability distribution index; a fourth information search module, configured to search the preset information for a critical value and a quantization probability group corresponding to the second data according to a probability distribution index of the second data; The second entropy decoding module is used to perform entropy decoding on the second data according to the critical value and quantization probability group corresponding to the second data; wherein, The first critical value is: 2; The second critical value is: 2; The third critical value is: 2; The fourth critical value is: 2; The fifth critical value is: 2; The sixth critical value is: 3; The seventh critical value is: 3; The first quantization probability group includes: 251, 2, 2; The second quantized probability group includes: 245, 5, 5; The third quantized probability group includes: 231, 12, 12; The fourth quantization probability group includes: 211, 22, 22; The fifth quantized probability group includes: 188, 33, 34; The sixth quantization probability group includes: 157, 48, 48, 1, 1; The seventh quantization probability group includes: 134, 57, 56, 4, 4.
39. An entropy encoder, characterized in that Used to perform the entropy coding method described in any one of claims 1 to 14, or used to perform the entropy coding method described in any one of claims 29 to 31.
40. An entropy decoder, characterized in that Used to perform the entropy decoding method described in any one of claims 15 to 28, or used to perform the entropy decoding method described in any one of claims 32 to 34.
41. An encoder, characterized in that Includes the entropy encoder described in claim 39.
42. A decoder, characterized in that Comprising the entropy decoder of claim 40.
43. A decoder, characterized in that: include: a memory and a processor, the memory being coupled to the processor; The memory stores program instructions, and when the program instructions are executed by the processor, the electronic device executes the entropy coding method as described in any one of claims 1 to 14, or executes the entropy coding method as described in any one of claims 29 to 31.
44. A decoder, characterized in that: include: a memory and a processor, the memory being coupled to the processor; The memory stores program instructions, and when the program instructions are executed by the processor, the electronic device executes the entropy decoding method as described in any one of claims 15 to 28, or executes the entropy decoding method as described in any one of claims 32 to 34.
45. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, and when the computer program runs on a computer or a processor, the computer or the processor executes the method according to any one of claims 1 to 34.
46. A computer program product, characterized in that The computer program product comprises computer instructions, and when the computer instructions are executed by a computer or a processor, the steps of the method according to any one of claims 1 to 34 are performed.