Entropy encoding method, entropy encoder, electronic component and electronic equipment
By designing a fast coding bypass in the entropy encoder and performing multi-bit arithmetic coding in a single cycle on the to-be-coded bit string of high-probability symbols, the path delay and hardware complexity problems caused by multi-bit coding in the existing technology are solved. Efficient, low-power video codec design is achieved.
Patent Information
- Application Number
- CN202410755868.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-12
- Publication Date
- 2024-09-24
AI Technical Summary
Existing entropy encoders have large chip areas and high power consumption due to longer path delays, poor timing, and increased hardware design complexity during multi-bit encoding, making it difficult to achieve miniaturization and low power consumption.
By designing a fast coding bypass and utilizing the coding characteristics of high-probability symbols, multiple to-be-coded bits subsequent to the current to-be-coded bit are multi-bit arithmetic encoded in a single cycle without the need for multiple read and write port registers, achieving multi-bit low path delay coding.
It improves coding efficiency, reduces chip area and power consumption, and is suitable for miniaturization and low-power design of video codecs.
Smart Images

Figure CN118694983A
Abstract
Description
Technical Field
[0001] The present disclosure relates to the technical field of video coding and decoding, and in particular to an entropy coding method, an entropy encoder, an electronic component and an electronic device. Background Art
[0002] Entropy coding is a statistical coding method that achieves lossless coding based on the principle of information entropy and converts a series of symbols into a binary code stream. Arithmetic coding is a type of entropy coding that uses context modeling technology to estimate and adapt to the actual probability distribution of the source, thereby reducing the information entropy of the source and improving coding efficiency. It has been adopted by common video protocols such as AVS3 and H.264 / AVC.
[0003] In video compression, entropy coding is at the end of the system, and the input data includes quantized transform coefficients, motion vector information, prediction mode information, etc. By tracking the probability of occurrence in the input data through the entropy coding algorithm, statistical redundancy between data can be effectively removed.
[0004] In common entropy encoder designs, binarization and arithmetic coding are pipelined processes. The input symbols are binarized to obtain the bit string to be encoded. Each bit to be encoded must go through the three steps of "reading context and encoding engine status - arithmetic coding - updating context and encoding engine" in series. Since the context model between each bit to be encoded has data dependencies, it is difficult to increase the calculation speed in parallel. If multiple bits to be encoded are encoded in a single cycle, the storage unit storing the context probability model usually needs to have multiple read and write ports so that the above three steps can be performed serially on multiple bits to be encoded in one clock cycle.
[0005] Although this multi-bit encoding implementation method can improve the encoding rate, multiple serial encoding logics will cause the path delay to become longer and the timing to become worse. At the same time, it is necessary to introduce storage units or register groups with multiple read and write ports in the hardware design, which will increase the chip area occupied and generate higher reading and writing power consumption, which is not conducive to the miniaturization and low-power design of the chip. Summary of the invention
[0006] The present disclosure provides an entropy coding method, an entropy encoder, an electronic component and an electronic device to solve the problems encountered in the prior art when implementing multi-bit coding.
[0007] To solve the above technical problems, the present disclosure is implemented as follows:
[0008] In one aspect, the present disclosure provides an entropy coding method, comprising:
[0009] Determine that the current bit to be encoded is a high probability symbol and the bit string to be encoded meets the fast encoding condition;
[0010] Perform multi-bit arithmetic coding in a single cycle on m bits to be coded subsequent to the current bit to be coded, where m≥2.
[0011] On the other hand, the present disclosure also provides a method for optimizing AVS3 entropy coding efficiency, comprising:
[0012] The entropy coding method as described above is performed on the binary bit string to be encoded of the residual coefficient.
[0013] In another aspect, the present disclosure further provides an entropy encoder, comprising:
[0014] A first determination unit, used to determine whether the current bit to be encoded is a high probability symbol;
[0015] A second determination unit, used to determine whether the bit string to be encoded satisfies the fast encoding condition;
[0016] The multi-bit encoding unit is used to perform multi-bit arithmetic coding in a single cycle on the m bits to be encoded subsequent to the current bit to be encoded, where m≥2.
[0017] On the other hand, the present disclosure further provides an electronic component for video encoding and decoding, wherein the electronic component includes the entropy encoder as described above.
[0018] In another aspect, the present disclosure further provides an electronic device, comprising the electronic component as described above.
[0019] The technical solution disclosed in the present invention designs a fast coding bypass in the existing entropy coding process. According to the distribution of probability symbols in the bit string to be coded and the characteristics of the context probability model used, the probability symbol of each bit in the subsequent bit string to be coded can be predicted. By utilizing the high coding efficiency of high probability symbols, the bit string to be coded with a high proportion of high probability symbols is passed through the fast coding bypass to perform multi-bit coding in a single cycle, which can effectively improve the hardware coding speed. By applying this technical solution, there is no need to use a register with multiple read / write ports, and the purpose of multi-bit coding per clock cycle can be achieved with a lower path delay, which not only achieves the beneficial effect of improving coding efficiency, but also facilitates the miniaturization and low power consumption design of the chip.
[0020] The above description is only an overview of the technical solution of the present disclosure. In order to more clearly understand the technical means of the present disclosure, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the present disclosure more obvious and easy to understand, the specific implementation methods of the present disclosure are listed below. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] In order to more clearly illustrate the embodiments of the present disclosure or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0022] Figure 1 A flowchart of an entropy coding method provided by an embodiment of the present disclosure;
[0023] Figure 2 A schematic diagram of the entropy coding process implemented according to the AVS3 standard;
[0024] Figure 3 A schematic diagram of a binary arithmetic coding process implemented according to the AVS3 standard;
[0025] Figure 4 A schematic diagram of the probability model update process implemented according to the AVS3 standard;
[0026] Figure 5 A schematic diagram of the encoding process for implementing the AVS3 entropy encoding efficiency optimization method of the disclosed embodiment;
[0027] Figure 6 A schematic diagram of the structure of an entropy encoder provided in an embodiment of the present disclosure;
[0028] Figure 7 A schematic diagram of a structure of a multi-bit encoding unit provided for implementing an embodiment of the present disclosure. DETAILED DESCRIPTION
[0029] In order to enable those skilled in the art to better understand the technical solutions in the present disclosure, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are only part of the embodiments of the present disclosure, rather than all of the embodiments. Based on the embodiments of the present disclosure, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present disclosure. In addition, for the sake of clarity, parts that are not related to the description of the exemplary embodiments are omitted in the drawings.
[0030] In the present disclosure, it should be understood that terms such as "including" or "having" are intended to indicate the existence of features, numbers, steps, behaviors, components, parts, or combinations thereof disclosed in the present disclosure, and are not intended to exclude the possibility that one or more other features, numbers, steps, behaviors, components, parts, or combinations thereof exist or are added. It should also be noted that the embodiments in the present disclosure and the features in the embodiments may be combined with each other if there is no conflict.
[0031] Currently, mainstream video protocols all adopt entropy coding for video compression. Binary arithmetic coding is a commonly used entropy coding algorithm, which utilizes context modeling technology to apply different arithmetic codes to high-probability symbols and low-probability symbols. The arithmetic coding of high-probability symbols and the update logic of the context probability model are much simpler than those of low-probability symbols. The logic delay is shorter and there is no need to update the context probability model, while low-probability symbols require more calculations and judgments.
[0032] The entropy coding method of the disclosed embodiment utilizes the coding characteristics of high-probability symbols, and when the current bit to be coded is a high-probability symbol and the bit string to be coded meets the fast coding conditions, performs multi-bit arithmetic coding in a single cycle on the m bits to be coded following the current bit to be coded. By performing multi-bit coding on multiple high-probability symbols, the coding efficiency is improved.
[0033] Figure 1 It is a flowchart of an entropy coding method for implementing an embodiment of the present disclosure.
[0034] like Figure 1 As shown, the method includes steps S110 and S120.
[0035] S110: Determine whether the current bit to be encoded is a high-probability symbol and the bit string to be encoded satisfies a fast encoding condition.
[0036] S120: Perform single-cycle multi-bit arithmetic coding on m bits to be coded subsequent to the current bit to be coded, where m≥2.
[0037] In the above process, the determination of whether the current bit to be encoded (also called Bin) is a high-probability symbol can be performed by the Bin value determination module of the existing entropy encoder. According to the determination result, the main control module determines whether to execute S120 in combination with the determination of the fast encoding condition. The determination of whether the current bit to be encoded is a high-probability symbol and whether the fast encoding condition is met can also be performed by the same main control module, for example, by two judgment units of a control module. In this embodiment, m is greater than or equal to 2, which means that at least 2 Bins are arithmetically encoded in a single cycle. Compared with the conventional method of encoding only 1 Bin in a single cycle, the scheme of this embodiment can save encoding cycles, thereby improving encoding efficiency.
[0038] According to the method of the embodiment of the present disclosure, the fast coding condition may be that the current bit to be coded and the subsequent m bits to be coded use the same probability model. This probability model is the context probability model used in arithmetic coding. In some implementations of arithmetic coding, if a bit to be coded is a high-probability symbol, then the subsequent same symbol using the same probability model as it can be predicted to be a high-probability symbol, and the opposite symbol to be a low-probability symbol. Therefore, based on the known information related to the bit string to be coded, it can be determined whether the current bit to be coded and the subsequent m bits use the same probability model, and the distribution of the corresponding m probability symbols can also be predicted, that is, whether each bit is a high-probability symbol or a low-probability symbol. When it is determined that the subsequent m bits to be coded use the same probability model, multi-bit coding can be achieved without reading the context storage unit and without the support of storage units with multiple read-write ports, thereby overcoming the shortcomings of the prior art.
[0039] According to the method of the embodiment of the present disclosure, performing multi-bit arithmetic coding in a single cycle on the m bits to be coded following the current bit to be coded can be implemented in the following manner:
[0040] According to known information corresponding to the bit string to be encoded, m probability symbols corresponding to the m subsequent bits to be encoded of the current bit to be encoded are determined; and multi-bit arithmetic coding is performed on the m probability symbols within a single cycle.
[0041] By using known information related to the bit string to be encoded, including that the syntax element corresponding to the bit string to be encoded is a specific coefficient, a specific binary code string is used, and the bit string to be encoded has a specific length and probability distribution, it is not necessary to perform the determination process for each Bin in conventional entropy coding, and the distribution of the corresponding m Bins can be directly determined, that is, whether each bit to be encoded is a high probability symbol or a low probability symbol. The process of determining the probability symbol bit by bit is omitted, which can improve the coding efficiency.
[0042] Furthermore, performing multi-bit arithmetic coding on the m probability symbols in a single cycle may be:
[0043] Divide the m probability symbols into multi-bit coding groups, each of which includes at most w high probability symbols or at most p high probability symbols plus q low probability symbols; perform multi-bit arithmetic coding on a multi-bit coding group in a single cycle, where m≥w, p≥q, and w>p. After a low probability occurs, the probability model and probability symbols may be updated, and the probability of subsequent Bins is difficult to predict. Therefore, in the disclosed embodiment, q=1 is a better choice.
[0044] The purpose of dividing the multi-bit coding groups is to set the multi-bit calculation granularity within a single cycle, and the calculation granularity is related to the following factors: the chip area occupied by the fast coding bypass, the path length generated by the multi-bit coding, the impact on the coding timing, etc. In a preferred embodiment, w=4, p=2, q=1 are set, that is, there are at most 4 high-probability coincidences for the symbols of multi-bit arithmetic coding in each cycle, or at most 2 high-probability symbols plus 1 low-probability symbol. According to the length of the actual m bit strings to be encoded, the groups are divided in order. For example, the m bit strings to be encoded are "000001", where "0" represents a high-probability symbol and "1" represents a low-probability symbol. Then, the two multi-bit coding groups obtained after division are "0000" and "01". These two multi-bit coding groups can be encoded in 2 cycles, while conventional coding requires 6 cycles to encode bit by bit to complete. Under the condition that the system clock frequency remains unchanged, the saved cycles bring about an improvement in coding efficiency.
[0045] Furthermore, performing multi-bit arithmetic coding on a multi-bit code group in a single cycle can be achieved by the following operations:
[0046] In a single cycle, probability symbols in a multi-bit code group are serially passed through a plurality of arithmetic encoders; and according to the distribution of the probability symbols in the multi-bit code group, a selection is made from the encoding results of the plurality of arithmetic encoders to output a corresponding code stream.
[0047] The fast coding bypass includes multiple arithmetic encoders. Multiple probability symbols in each multi-bit coding group are arithmetically encoded in a serial manner in a single cycle. The coding results are integrated to become the corresponding code stream output. For example, the symbol in the current multi-bit coding group is "001", "0" is a high probability symbol, and "1" is a low probability symbol. The coding results need to be output as a code stream in this order. This structure will not increase path delay and will not affect the timing relationship.
[0048] According to the scheme of the embodiment of the present disclosure, a fast coding bypass is designed in the existing entropy coding process. Based on the current known information, the probability symbol of each bit in the subsequent bit string to be coded is predicted. By utilizing the high coding efficiency of high-probability symbols, the bit string to be coded with a high proportion of high-probability symbols is passed through the fast coding bypass to perform multi-bit coding within a single cycle, which can effectively improve the hardware coding speed. Applying this technical solution, there is no need to use multiple read-write port registers, and the purpose of multi-bit coding per clock cycle is achieved with lower path delay, which not only achieves the beneficial effect of improving coding efficiency, but also facilitates the miniaturization and low-power design of chips. On the premise of improving coding efficiency, it is also conducive to hardware chip miniaturization and low power consumption.
[0049] The following is an illustration of an embodiment of implementing the technical solution of the present disclosure in AVS3 entropy coding.
[0050] AVS (Audio Video Coding Standard) is a digital audio and video coding standard, and AVS3 is the third generation of AVS standard (hereinafter referred to as "AVS3"). Entropy coding defined by AVS3 is: firstly, the input syntax elements are binarized into bits to be coded, and then, according to the coding engine status and context probability model, the bits to be coded are compressed into a bit stream to eliminate the redundancy between codewords. Entropy coding can bring more than 20% lossless compression rate.
[0051] Figure 2 Schematic diagram of the entropy coding process implemented according to the AVS3 standard. Figure 2 As shown in the figure, the encoding process includes binarization, context memory, context update and binary arithmetic encoding. During encoding, the input non-binary syntax element (SyntaxElement) is first mapped into a binary bit string through the binarization module, and each bit is used as a bit to be encoded (Bin). During context modeling, a suitable probability model is selected for each bit to be encoded (Bin). During binary arithmetic encoding, encoding is performed according to this Bin value and its probability model (defined by model_idx and model), and the code stream (Bitstream) is output. The content of the new context storage after encoding, and then the same encoding process is performed on the next Bin.
[0052] In AVS3, after processing and calculating the image block, two residual coefficients are obtained: coefficient run (coeff_run, i.e. the number of "0" coefficients between two non-zero coefficients) and coefficient amplitude (coeff_level_minus1). In I-frames, these two residual coefficients account for more than 70% of the bits to be encoded. The higher the bit rate of the I-frame, the greater the proportion of these two parts. Therefore, it is of great significance to improve the coding efficiency of the residual coefficients.
[0053] The characteristics of these two residual coefficients in AVS3 are analyzed below.
[0054] AVS3 defines the binarization method for these two residual coefficients as follows:
[0055] Set the thresholds TH of the two residual coefficients, where the threshold of the coefficient run is TH=16 and the threshold of the coefficient amplitude is TH=8;
[0056] If the synElVal value of a residual coefficient is less than the threshold TH corresponding to the residual coefficient, the residual coefficient is binarized using the truncated unary code of maxVal=TH; if the synElVal value of a residual coefficient is greater than or equal to the threshold TH corresponding to the residual coefficient, the first TH bits of the binary symbol string obtained after binarization are all "0", and the subsequent (synElVal-TH) bits are the corresponding 0th-order exponential Golomb code.
[0057] The truncated unary code uses the conventional binary arithmetic coding method, and the Golomb coding uses a bypass method that does not need to update the probability model. The specific coding method can be found in the AVS3 standard.
[0058] Table 1 gives the binary symbol strings corresponding to different synElVal values in AVS3.
[0059] Table 1 Relationship between different synElVal values and binary symbol strings
[0060]
[0061] According to the above binarization process of the two residual coefficients, it can be found that the first TH bits of the binary symbol string obtained after the coefficient run and the coefficient amplitude are binarized must be a full "0" symbol string or a symbol string with a "1" at the end and the remaining bits as "0". For example, the threshold value TH of the coefficient amplitude is 8, and the synElVal value of a certain coefficient amplitude is 7. It can be seen from Table 1 that the symbol string after binarization has 8 bits, the first 7 bits are "0", and the end is "1". For another example, the threshold value TH of the coefficient run is 16, and the synElVal value of a certain coefficient run is 22. It can be seen from Table 1 that the symbol string after binarization has 21 bits, and the first 16 bits are all "0".
[0062] After the binary symbol string is converted, each Bin in it needs to be entropy coded and compressed through context modeling and binary arithmetic coding in turn. During arithmetic coding, according to the context probability model, the Bin to be encoded can be divided into a high probability symbol MPS (Most Probability Symbol) and a low probability symbol LPS (Low Probability Symbol), which represent binary symbols that appear with high probability or low probability, respectively. These two symbols need to be encoded and the context probability model updated through different logics.
[0063] Figure 3 Figure 1 is a schematic diagram of the binary arithmetic coding process implemented according to the AVS3 standard. Figure 3As shown, the input bit to be encoded Bin is compared with the high probability symbol (cmps). If it is determined to be a high probability symbol MPS, it is encoded through the high probability symbol MPS encoding branch on the left. If it is determined to be a low probability symbol LPS, it is encoded through the low probability symbol LPS encoding branch on the right. Each branch has different encoding logic. For details, please refer to the AVS3 standard, which will not be elaborated in this disclosure.
[0064] Figure 4 FIG. 1 is a schematic diagram of the probability model update process implemented according to the AVS3 standard. Figure 4 As shown, the input Bin to be encoded is compared with the high probability symbol cmps. If it is determined to be a high probability symbol MPS, it is updated through the high probability symbol MPS encoding branch on the left. If it is determined to be a low probability symbol LPS, the context probability model is updated through the low probability symbol LPS encoding branch on the right. Each branch has different update logic, which can be referred to the AVS3 standard for details, and will not be elaborated in this disclosure.
[0065] pass Figure 3 and Figure 4 It can be seen that in the AVS3 entropy coding algorithm, the arithmetic coding and context probability model update logic of the high probability symbol MPS are much simpler than those of the low probability symbol LPS, with shorter logic delay and no need to update the context probability model, while the low probability symbol LPS requires more calculations and judgments.
[0066] On the other hand, according to the provisions of AVS3, when selecting a probability model, the same probability model is used for entropy coding of the bit string to be encoded in the truncated unary code part, except for the first bit. Therefore, when the "0" of the current bit to be encoded is judged as a high-probability symbol, the subsequent consecutive "0" must be a high-probability symbol, and the "1" at the end must be a low-probability symbol (see Table 1). Based on this feature, the probability distribution of subsequent symbols in the bit string to be encoded can be predicted in advance, that is, when a symbol "0" in the truncated unary code bit string using the same probability model is a high-probability symbol, the probability of subsequent symbols can all be predicted.
[0067] Based on the above characteristics of AVS3 entropy coding, the disclosed embodiment optimizes the efficiency of AVS3 entropy coding. The optimization method performs the entropy coding method as described above on the binary bit string to be encoded of the residual coefficient. For example, for I frames with high bit rates, the bits to be encoded of the residual coefficients account for more than 70%. The higher the bit rate, the greater the proportion of these two parts. More bits to be encoded means a large amount of entropy coding calculation, so it is the bottleneck point for improving the rate of the entropy encoder. Improving the coding efficiency of the residual coefficients can significantly improve the overall coding efficiency. By designing a fast coding bypass in the AVS3 entropy encoder, multi-bit coding is performed in a single cycle when the conditions are met, which can effectively alleviate this problem when applied to I frames.
[0068] Table 2 shows the effect of fast coding the coefficient run, where the calculation granularity of the fast coding bypass is a maximum of 4 MPS symbols per cycle or 2 MPS symbols plus 1 LPS symbol per cycle.
[0069] Table 2 Efficiency comparison between fast coding bypass method and conventional coding method
[0070] Coefficient Run Binarized bit string Number of cycles in normal mode Fast code bypass cycles Cycles saved 0 1 1 1 0 1 01 2 2 0 2 001 3 3 0 3 0001 4 3 1 4 00001 5 3 2 5 000001 6 4 2 6 0000001 7 4 3 7 00000001 8 4 4 8 000000001 9 4 5 9 0000000001 10 5 5 10 00000000001 11 5 6 11 000000000001 12 5 7 12 0000000000001 13 5 8 13 00000000000001 14 6 8 14 000000000000001 15 6 9 15 0000000000000001 16 6 10
[0071] From Table 2, we can see that starting from the coefficient run value of "3", the fast coding bypass method can bring the beneficial effect of saving coding cycles. When the coefficient run value is "15", it can bring 10 saved cycles. When the system clock frequency remains unchanged, these saved cycles will significantly improve the coding efficiency.
[0072] To this end, based on the same inventive concept, the disclosed embodiment also provides a method for optimizing the efficiency of AVS3 entropy coding, which performs the entropy coding method as described above on the binary bit string to be encoded of the residual coefficient defined in AVS3.
[0073] Figure 5 A schematic diagram of the encoding process for implementing the AVS3 entropy coding efficiency optimization method of the disclosed embodiment.
[0074] like Figure 5 As shown, the encoder designs a fast coding bypass based on the conventional AVS3 entropy encoder, which includes a multi-bit coding module and a multi-bit coding update module, and also adds a fast coding determination module. When executing the optimization method, the input syntax element is binarized to obtain a bit string to be coded (Bin), and then enters the corresponding coding branch after context storage and fast coding condition determination. If the current Bin is a high-probability symbol and the bit string to be coded meets the fast coding condition, the subsequent m bits to be coded are multi-bit coded through the fast coding bypass on the left, and the content of the context storage is updated after the multi-bit coding is completed. Since the probability symbols of the subsequent m bits to be coded can be predicted and they use the same context probability model, there is no need to determine the Bin value and read the storage unit during multi-bit coding, and the coding can be completed efficiently.
[0075] The above is an explanation of the entropy coding in the AVS3 standard through the application of the disclosed technical solution as an embodiment. It should be understood that the disclosed technical solution can also be applied to other entropy codings with similar characteristics to achieve the purpose of efficiency optimization, such as the entropy coding process applied in SVAC (full-security surveillance digital audio and video encoding and decoding technology standard).
[0076] Based on the same inventive concept, an embodiment of the present disclosure further provides an entropy encoder 600 .
[0077] Figure 6 A schematic diagram of the structure of an entropy encoder for implementing an embodiment of the present disclosure.
[0078] like Figure 6 As shown, the entropy encoder 600 includes a first determination unit 610 , a second determination unit 620 and a multi-bit encoding unit 630 .
[0079] The first determination unit 610 is used to determine whether the current bit to be encoded is a high probability symbol.
[0080] The second determination unit 620 is used to determine whether the bit string to be encoded satisfies the fast encoding condition.
[0081] The multi-bit encoding unit 630 is used to perform multi-bit arithmetic coding in a single cycle on the m bits to be encoded subsequent to the current bit to be encoded, where m≥2.
[0082] In addition, the entropy encoder 600 further includes a multi-bit encoding update unit 640, which is used to update the context storage content after completing the multi-bit encoding. The multi-bit encoding unit 640 and the multi-bit encoding update unit 640 constitute a fast encoding path.
[0083] Furthermore, the multi-bit encoding unit 630 in the embodiment of the present disclosure includes:
[0084] The w high probability symbol encoders connected in series and the q low probability symbol encoders connected in parallel with the w high probability symbol encoders are used to perform arithmetic coding on the high probability symbols and the low probability symbols, respectively.
[0085] Furthermore, among the w high probability symbol encoders, p high probability symbol encoders are serially connected with q low probability symbol encoders in a multiplexing manner. This structure can optimize module utilization and reduce the occupied chip area.
[0086] Furthermore, the multi-bit encoding unit 630 further includes:
[0087] The coding result selector is used to select from the coding results of w high probability symbol encoders and q low probability symbol encoders to output the corresponding code stream according to the distribution of probability symbols in the current multi-bit coding group. By integrating the coding results through the selector, the timing of the coding output can be optimized.
[0088] In the above encoder, m≥w, p≥q, w>p. Preferably, q=1.
[0089] Figure 7 A schematic diagram of a structure of a multi-bit encoding unit provided for implementing an embodiment of the present disclosure.
[0090] like Figure 7As shown, the multi-bit encoding unit includes four MPS encoders and one LPS encoder, wherein three MPS encoders are connected to the LPS encoder through a multiplexer, thereby forming two structures of multi-bit encoding branches.
[0091] Figure 7 The structure of the multi-bit coding unit shown can support the following six symbol situations of the input multi-bit coding group: "MPS", "MPS MPS", "MPS MPS MPS", "MPS MPS MPS MPS", "MPS LPS", and "MPS MPS LPS".
[0092] These six situations can be distinguished by a CASE value. When executing multi-bit encoding, the symbol combination in the current multi-bit encoding group can be determined according to the input CASE value, and the corresponding encoding and result selection is performed accordingly. For example, when the current multi-bit encoding group is determined to be "MPS MPS LPS" according to the CASE value, the encoding is serially passed through MPS encoder 0, MPS encoder 1 and LPS encoder, and the encoding result selector selects from the encoding results of MPS encoder 0, MPS encoder 1 and LPS encoder to integrate into the corresponding code stream.
[0093] If the length of the bit string to be encoded is greater than the length m that can be quickly encoded, then encoding is performed starting from the m+1th bit to be encoded using a conventional encoding method, and the final output code stream is integrated based on the results of the implemented multi-bit encoding and conventional encoding.
[0094] According to the entropy encoder of the embodiment of the present disclosure, by adding a fast encoding bypass in the original encoder, the probability symbol of the bit string to be encoded can be predicted according to the distribution characteristics of the probability symbol in the bit string to be encoded and the context probability model used, and the bit string to be encoded with a high proportion of high probability symbols passes through the fast encoding bypass, which can effectively improve the hardware encoding speed. The entropy encoding does not need to use a register with multiple read and write ports, and can achieve the purpose of multi-bit encoding per clock cycle with a lower path delay, which not only achieves the beneficial effect of improving encoding efficiency, but also facilitates the miniaturization and low power consumption design of the chip.
[0095] Based on the same inventive concept, the disclosed embodiment also provides an electronic component for video coding and decoding, the electronic component includes the entropy encoder as described above. The electronic component can be used to achieve more efficient video coding and decoding at low cost and low power consumption. For example, an integrated circuit or chip for video coding and decoding.
[0096] Based on the same inventive concept, the embodiment of the present disclosure also provides an electronic device, which includes the electronic components as described above. For example, a smart phone including the electronic components can speed up the video loading speed and improve the heating situation when processing the video.
[0097] The above describes specific embodiments of the present disclosure. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the accompanying drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0098] Each embodiment in the present disclosure is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the embodiments of devices and electronic devices, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiments.
[0099] The methods, devices, electronic devices and circuit structures provided in the embodiments of the present disclosure correspond to each other. Therefore, the methods, devices and electronic devices also have similar beneficial technical effects as the corresponding methods. Since the beneficial technical effects of the methods have been described in detail above, they will not be repeated here.
[0100] The above description is only an embodiment of the present disclosure and is not intended to limit the present disclosure. For those skilled in the art, the present disclosure may have various changes and variations. Any modification, equivalent substitution, improvement, etc. made within the spirit and principle of the present disclosure shall be included in the scope of the claims of the present disclosure.
Claims
1. An entropy coding method, characterized in that: include: Determine that the current bit to be encoded is a high probability symbol and the bit string to be encoded meets the fast encoding condition; Performing multi-bit arithmetic coding in a single cycle on m bits to be encoded subsequent to the current bit to be encoded; Where m≥2.
2. The method according to claim 1, characterized in that The fast encoding conditions include: The current bit to be encoded and the subsequent m bits to be encoded use the same probability model.
3. The method according to claim 1, characterized in that The performing multi-bit arithmetic coding in a single cycle on the m bits to be coded subsequent to the current bit to be coded comprises: Determine m probability symbols corresponding to m subsequent bits to be encoded according to known information corresponding to the bit string to be encoded; Multi-bit arithmetic coding is performed on the m probability symbols within a single cycle.
4. The method according to claim 3, characterized in that The performing multi-bit arithmetic coding on the m probability symbols in a single cycle comprises: Dividing the m probability symbols into multi-bit code groups, each multi-bit code group includes at most w high probability symbols or at most p high probability symbols plus q low probability symbols; performing multi-bit arithmetic coding on one of the multi-bit code groups in a single cycle; Among them, m≥w, p≥q, w>p.
5. The method according to claim 4, characterized in that The performing multi-bit arithmetic coding on one of the multi-bit coding groups in a single cycle comprises: In a single cycle, the probability symbols in the multi-bit code group are serially passed through a plurality of arithmetic encoders; According to the distribution of probability symbols in the multi-bit code group, selection is made from the encoding results of the multiple arithmetic encoders to output a corresponding code stream.
6. A method for optimizing AVS3 entropy coding efficiency, characterized in that: include: The entropy coding method according to any one of claims 1 to 5 is performed on the binarized bit string to be encoded of the residual coefficient.
7. An entropy encoder, characterized in that include: A first determination unit, used to determine whether the current bit to be encoded is a high probability symbol; A second determination unit, used to determine whether the bit string to be encoded satisfies the fast encoding condition; The multi-bit encoding unit is used to perform multi-bit arithmetic coding in a single cycle on the m bits to be encoded subsequent to the current bit to be encoded, where m≥2.
8. The entropy encoder according to claim 7, characterized in that The multi-bit encoding unit comprises: The w high probability symbol encoders connected in series and the q low probability symbol encoders connected in parallel with the w high probability symbol encoders are used to perform arithmetic coding on the high probability symbols and the low probability symbols respectively.
9. The entropy encoder according to claim 8, characterized in that Among the w high probability symbol encoders, p of the high probability symbol encoders are serially connected with q of the low probability symbol encoders in a multiplexing manner.
10. The entropy encoder according to claim 8, characterized in that The multi-bit encoding unit also includes: The coding result selector is used to select from the coding results of the w high probability symbol encoders and the q low probability symbol encoders to output a corresponding code stream according to the distribution of probability symbols in the current multi-bit coding group.
11. An electronic component for video encoding and decoding, characterized in that: The electronic component comprises an entropy encoder as claimed in any one of claims 7 to 10.
12. An electronic device, characterized in that: Comprising the electronic component as claimed in claim 11.
