Bypass coding method, equipment, medium and product

By simplifying the update of the bypass encoding probability to single-time multi-bit calculation, the hardware complexity and timing delay problems caused by bit-by-bit processing are solved, and the chip area and timing length are reduced, which improves the encoding rate.

CN120281322APending Publication Date: 2025-07-08HUNAN GOKE MICROELECTRONICS CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510328746.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-19
Publication Date
2025-07-08

AI Technical Summary

Technical Problem

The prior art requires bit-by-bit processing of binary numbers for probability updates when continuously bypass encoding, resulting in increased hardware implementation complexity and timing delay.

Method used

The probability update process is simplified by calculating the total number of bits of the target binary sequence and its corresponding decimal values, and is a single multi-bit calculation, avoiding bit-by-bit processing, and reducing calculation units and logical resources.

Benefits of technology

It significantly reduces chip area consumption and timing length, improves encoding rate, and reduces hardware complexity and timing delay.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120281322A_ABST
    Figure CN120281322A_ABST
Patent Text Reader

Abstract

The invention provides a bypass coding method and device, a medium and a product, and the method comprises the steps: obtaining a target binary sequence in a CABAC coding process; the target binary sequence comprises continuous N bits of binary numbers for executing bypass coding, and N is an integer greater than 1; calculating a bypass coding probability of the target binary sequence based on the decimal numerical values corresponding to the N and N bits of binary numbers; and coding the target binary sequence according to the bypass coding probability. Complex calculation of bit-by-bit processing probability updating of binary numbers in a traditional method is avoided, calculation complexity is reduced by reducing calculation units and logic resources needed by bit-by-bit updating, chip area consumption and time sequence length are remarkably reduced, and therefore the coding rate of a chip is greatly improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of coding technologies, and in particular, to a bypass coding method, device, medium, and product. Background Art

[0002] Context-based Adaptive Binary Arithmatic Coding (CABAC) was first introduced in H.264. Compared with Context-based Adaptive Variable Length Coding (CAVLC), CABAC can bring higher performance improvement. CABAC mainly includes three processes: (1) representing the syntax information to be encoded in a binary manner; (2) selecting a suitable probability model to generate the probability of a binary number; and (3) performing binary arithmetic coding based on the probability.

[0003] In binary arithmetic coding, especially in CABAC, the probability model of binary numbers needs to be dynamically updated to adapt to the local characteristics of data distribution, aiming to improve the coding efficiency by adapting to changes in data statistical characteristics. Bypass coding, as a mode of CABAC, is often used to process binary numbers with probabilities close to a uniform distribution. At this time, complex probability modeling is not required, but the coding calculation still needs to be completed through interval parameters such as probability and probability intervals. In bypass coding, the interval parameters are updated by processing binary numbers bit by bit. For N consecutive binary numbers that need to be bypass-coded, the traditional method needs to process binary numbers bit by bit for probability update, and finally multiple results will be generated, and one of them is selected as the final probability according to different permutation orders. Since the traditional method needs to process binary numbers bit by bit for probability update, and each update requires an independent calculation unit, it increases the complexity of hardware implementation and timing delay. Summary of the Invention

[0004] The present invention provides a bypass coding method, device, medium, and product to solve the problem in the prior art that when continuously performing bypass coding, binary numbers need to be processed bit by bit for probability update, and each update requires an independent calculation unit, which increases the complexity of hardware implementation and timing delay.

[0005] In a first aspect, the present invention provides a bypass coding method, including: During the CABAC coding process, obtaining a target binary sequence; the target binary sequence includes N consecutive bits of binary numbers for which bypass coding is performed, and N is an integer greater than 1; Calculating the bypass coding probability of the target binary sequence based on the N and the decimal values corresponding to the N bits of the binary numbers; Encode the target binary sequence according to the bypass encoding probability.

[0006] In one embodiment, calculating the bypass encoding probability of the target binary sequence based on the decimal value corresponding to the N and N-bit binary number includes: Obtain a historical encoding probability, where the historical encoding probability is the latest encoding probability before the target binary sequence; Update the historical encoding probability based on the decimal value corresponding to the N and N-bit binary number to obtain the bypass encoding probability of the target binary sequence.

[0007] In one embodiment, updating the historical encoding probability based on the decimal value corresponding to the N and N-bit binary number to obtain the bypass encoding probability of the target binary sequence includes: Perform a first operation using the decimal value corresponding to the N-bit binary number and a fixed coding interval length to obtain a first operation result; Update the historical encoding probability based on the first operation result and the N to obtain the bypass encoding probability of the target binary sequence.

[0008] In one embodiment, performing the first operation using the decimal value corresponding to the N-bit binary number and a fixed coding interval length to obtain a first operation result includes: Multiply the decimal value corresponding to the N-bit binary number by the fixed coding interval length to obtain a first operation result.

[0009] In one embodiment, updating the historical encoding probability based on the first operation result and the N to obtain the bypass encoding probability of the target binary sequence includes: Shift the historical encoding probability left by N bits to obtain a shifted result; Add the shifted result and the first operation result to obtain the bypass encoding probability of the target binary sequence.

[0010] In one embodiment, obtaining the target binary sequence includes: Load the syntax information required for the current CABAC encoding and binaryize the syntax information to obtain an encoding sequence; Intercept the target binary sequence from the encoding sequence.

[0011] In one embodiment, the target binary sequence is encoded and operated in a step-by-step pipelining manner.

[0012] In a second aspect, the present invention provides an electronic device, which includes a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the program, the steps of any of the above bypass coding methods are implemented.

[0013] In a third aspect, the present invention further provides a non-transitory computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of any of the above bypass coding methods are implemented.

[0014] In a fourth aspect, the present invention further provides a computer program product, which includes a computer program. The computer program can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by the processor, the steps of any of the above bypass coding methods are implemented.

[0015] For the bypass coding method, device, medium, and product provided by the present invention, during the CABAC coding process, for the target binary sequence that needs to continuously perform bypass coding, the bypass coding probability is calculated through the total number of bits of the target binary sequence and its corresponding decimal value. The probability update process of the binary numbers that need to continuously perform bypass coding is simplified to a single multi-bit calculation, avoiding the complex calculations of updating the probability bit by bit for binary numbers in the traditional method. By reducing the calculation units and logic resources required for bit-by-bit update, the calculation complexity is reduced, the chip area consumption and timing length are significantly reduced, thereby greatly improving the coding rate of the chip, and solving the problem in the prior art that when continuously performing bypass coding, it is necessary to process binary numbers bit by bit for probability update, and each update requires an independent calculation unit, increasing the complexity of hardware implementation and timing delay. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, the drawings in the following description are some embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.

[0017] Figure 1 is a flowchart of the bypass coding method provided by the present invention.

[0018] Figure 2 is a schematic diagram of the process of bypass coding probability of the related art involved in the present invention.

[0019] Figure 3 is a schematic diagram of the architecture of the related art in the present invention for continuous 3-bit bypass coding bin.

[0020] Figure 4 It is a schematic structural diagram of the solution provided by the present invention for the architecture of continuous 3-bit bypass coding bins.

[0021] Figure 5 It is a schematic structural diagram of the bypass coding device provided by the present invention.

[0022] Figure 6 It is a schematic structural diagram of the electronic device provided by the present invention. Detailed implementation manners

[0023] To make the objectives, technical solutions and advantages of the present invention clearer, the technical solutions in the present invention will be clearly and completely described below with reference to the accompanying drawings in the present invention. Apparently, the described embodiments are some but not all of the embodiments of the present invention. All other embodiments obtained by those of ordinary skill in the art without making creative efforts based on the embodiments in the present invention belong to the scope of protection of the present invention.

[0024] The terms "first", "second", etc. in the present invention are used to distinguish similar objects and are not used to describe a specific order or sequence. It should be understood that such data can be interchanged under appropriate circumstances so that the embodiments of the present invention can be implemented in an order different from those illustrated or described herein.

[0025] The following Figures 1-6 describes the bypass coding method, device, medium and product provided by the present invention.

[0026] Combined with Figure 1 , Figure 1 It is a schematic flow diagram of the bypass coding method provided by the present invention.

[0027] As Figure 1 shown, the method includes the following: Step 101, during the CABAC coding process, obtain a target binary sequence; the target binary sequence includes binary numbers with continuous N bits for bypass coding, and N is an integer greater than 1; Step 102, based on the N and the decimal value corresponding to the N-bit binary number, calculate the bypass coding probability of the target binary sequence; Step 103, encode the target binary sequence according to the bypass coding probability.

[0028] In the process of CABAC encoding in this embodiment, for the target binary sequence that needs to be continuously bypass-encoded, the bypass-encoding probability is calculated through the total number of bits of the target binary sequence and its corresponding decimal value, simplifying the probability update process of the binary numbers that need to be continuously bypass-encoded into a single multi-bit calculation, avoiding the complex calculation of updating the probability bit by bit for binary numbers in the traditional method. By reducing the computing units and logic resources required for bit-by-bit update, the computational complexity is reduced, significantly reducing the chip area consumption and timing length, thereby greatly improving the encoding rate of the chip, and solving the problem in the prior art that when continuously performing bypass encoding, it is necessary to process binary numbers bit by bit for probability update, and each update requires an independent computing unit, increasing the complexity of hardware implementation and timing delay.

[0029] It should be noted that the bypass-encoding method provided by the embodiment of the present invention is implemented based on a bypass-encoding device. This device can be a chip, such as a VPU chip or a chip with encoding function, can be a device or apparatus carrying the above chip, or can also be other encoding devices, etc.

[0030] The bypass-encoding method provided by the present invention is mainly applied to the CABAC encoding scenario. As described above, CABAC is mainly divided into three processes. One is to represent the syntax information to be encoded in a binary manner, the second is to generate the probability of binary numbers, and the third is to perform binary arithmetic encoding based on the probability. In the case of multi-bit continuous encoding, the embodiment of the present invention improves the second step of generating the probability of binary numbers.

[0031] It should be noted that binary arithmetic encoding is divided into a regular encoder and a bypass encoder. The designer needs to select a regular encoder or a bypass encoder according to the type of context syntax information. How many bits of regular encoding and bypass encoding can be continuously encoded simultaneously within one clock cycle is an important indicator to measure the encoding performance of CABAC.

[0032] It is reported that in some related technologies, the maximum number of bits that can be encoded simultaneously in one cycle is 4 bits of regular encoding or 4 bits of bypass encoding. However, when continuously encoding multi-bit bypass encoding, the resulting chip area and timing consumption are huge. Optimizing the area consumption can reduce the chip cost, and optimizing the timing length can encode more bits of bypass encoding in one clock cycle. A good encoding structure can reduce the chip power consumption while optimizing the area and timing length.

[0033] Therefore, in order to improve the CABAC encoding rate and reduce the chip cost, in the embodiments of the present invention, for the second step, a new multi-bit bypass encoding probability calculation method is designed, which simplifies the probability update process of binary numbers undergoing consecutive bypass encoding into a single multi-bit calculation. By reducing the calculation units and logic resources required for bit-by-bit updates, the chip area consumption and timing length are significantly reduced, thereby greatly improving the encoding rate of the chip.

[0034] Regarding how to perform multi-bit consecutive encoding based on probability, in one embodiment, it can be performed with reference to the prior art. The bypass encoding method provided by the embodiments of the present invention has been able to achieve efficiency improvement in the encoding process.

[0035] Alternatively, in one embodiment, the above target binary sequence can be encoded and operated in a stage-by-stage pipelining manner. The arithmetic coding structure of multi-bit bypass encoding is implemented using stage-by-stage pipelining, which can fully match the computational efficiency of encoding and thus will not affect the overall system performance.

[0036] In some examples of step 101, before starting CABAC encoding, the syntax information required for the current task can be loaded from the upper module into the cache. When performing CABAC encoding, multiple syntax information in the cache can be obtained, and these syntax information are loaded into CABAC in the arrangement order of the syntax information for binaryization to obtain multiple binary numbers with a timing relationship.

[0037] As stated above, in CABAC encoding, each binary number is assigned a type that needs to be encoded, including bypass encoding and regular encoding. The embodiments of the present invention only consider binary numbers that need to be bypass encoded. Bypass encoding is a special encoding mode in CABAC, which is used to process binary numbers that are not applicable to the context model or whose context information is insufficient to provide an effective probability estimate. In the bypass encoding mode, the encoding process does not depend on the context model but uses a fixed probability estimate.

[0038] Therefore, among multiple binary numbers with a timing relationship, the encoding type of each binary number may be bypass encoding or regular encoding. Considering that the bypass encoding probability calculation needs to be performed on consecutive multi-bit binary numbers, consecutive N bits (N is an integer greater than 1) of binary numbers belonging to the bypass encoding type can be intercepted from multiple binary numbers with a timing relationship and form a target binary sequence according to the timing.

[0039] For example, after binaryizing a certain syntax information, an initial binary sequence 011 is obtained, which includes 3-bit binary numbers.

[0040] For another example, the 6-bit binary numbers 0, 1, 1, 1, 0, 0 have a continuous relationship, and the encoding types of the 6-bit binary numbers 0, 1, 1, 1, 0, 0 are the regular encoding type, the bypass encoding type, the bypass encoding type, the bypass encoding type, the regular encoding type, and the regular encoding type, respectively. Therefore, among the 6-bit binary numbers, 1, 1, 1 are binary numbers with a continuous relationship among multiple binary numbers belonging to the bypass encoding type, and they are divided into the target binary sequence, that is, 111.

[0041] For another example, when continuously capturing the bypass encoding type, if a regular encoding type or the end of CABAC encoding is encountered, the quantity N of the current continuous encoding can be intercepted to obtain the target binary sequence.

[0042] That is, the process of obtaining the target binary sequence described above may include: Loading the syntax information required for the current CABAC encoding and binaryizing the syntax information to obtain an encoding sequence; Intercepting the target binary sequence from the encoding sequence.

[0043] In the embodiment of the present invention, by identifying the encoding type of each binary number in the initial binary sequence, the binary numbers belonging to the bypass encoding type are effectively screened out from them, and then the binary numbers with a continuous relationship are divided into the target binary sequence, realizing the efficient grouping of multi-bit binary numbers that need to be continuously bypass encoded.

[0044] Further, for the probability calculation process of the target binary sequence, the bypass encoding probability of the target binary sequence can be calculated through the total number of bits of the target binary sequence and its corresponding decimal value, thereby simplifying the probability update process of the binary numbers that need to be continuously bypass encoded into a single multi-bit calculation. It avoids the complex calculation of updating the probability bit by bit for binary numbers in the traditional method, can reduce the calculation units and logic resources required for bit-by-bit update while meeting the requirements of the CABAC encoding rate, reduces the calculation complexity, significantly reduces the chip area consumption and the timing length, and thus greatly improves the encoding rate of the chip.

[0045] In some examples, based on step 102, calculating the bypass encoding probability of the target binary sequence based on the N and the decimal value corresponding to the N-bit binary number includes: Obtaining the historical encoding probability, where the historical encoding probability is the latest encoding probability before the target binary sequence; Updating the historical encoding probability based on the N and the decimal value corresponding to the N-bit binary number to obtain the bypass encoding probability of the target binary sequence.

[0046] It should be noted that in combination with Figure 2 , Figure 2 is a schematic diagram of the calculation process of the bypass coding probability of the related technology involved in the present invention. As Figure 2 shown, EncodeBypass() represents the current bypass coding function, where binVal is the binary number representing 1-bit execution of bypass coding, taking values 0 or 1. The historical coding probability (ivlLow) and the fixed coding interval length (ivlCurrRange) are the parameter values involved in the calculation of the bypass coding probability by CABAC. Among them, the fixed coding interval length is the interval length value of the fixed coding range in bypass coding. During the entire calculation of the bypass coding probability, EncodeBypass() only needs to update the value of ivlLow to obtain the current ivlLow_post, and the value of ivlLow needs to be kept within the range of 512.

[0047] It can be seen that the main calculation of the binary number for single-bit execution of bypass coding is the process of updating ivlLow. Corresponding to this solution, based on N in the obtained N-bit continuous bypass coding binary number and the decimal value corresponding to the N-bit binary number, the historical coding probability ivlLow can be updated, thereby obtaining the bypass coding probability ivlLow_post of the target binary sequence.

[0048] Please continue to refer to Figure 2 , considering that during the bypass coding process, the fixed coding interval length (ivlCurrRange) is also one of the parameter values involved in the calculation of the bypass coding probability by CABAC, and the value of ivlCurrRange remains unchanged. Therefore, in this solution, during the process of updating the historical coding probability based on the N and the decimal value corresponding to the N-bit binary number to obtain the bypass coding probability of the target binary sequence, the following process may be included: Perform a first operation using the decimal value corresponding to the N-bit binary number and the fixed coding interval length to obtain a first operation result; Update the historical coding probability based on the first operation result and the N to obtain the bypass coding probability of the target binary sequence.

[0049] The first operation may adopt a multiplication operation, that is, multiply the decimal value corresponding to the N-bit binary number for bypass coding by the fixed coding interval length to obtain a first operation result.

[0050] In some examples, updating the historical coding probability based on the first operation result and N may be to first shift the historical coding probability to the left by N bits to obtain a shifted result, and then add the shifted result and the first operation result to obtain the bypass coding probability of the target binary sequence.

[0051] Therefore, the probability update calculation formula for the binary numbers performing bypass coding continuously for N bits is as follows: ; Wherein, represents the historical coding probability; << represents a left shift of bits; N represents the total number of bits of the target binary sequence; represents the fixed coding interval length; M represents the decimal value corresponding to the N-bit binary number; represents the bypass coding probability of the target binary sequence.

[0052] The embodiments of the present invention optimize the complicated 2^N kinds of additions and multiplications into the final simple calculation formula. Especially when the number of bits of the target binary sequence is larger, under the requirement of meeting the CABAC coding rate, it can greatly save the components consumed by the chip area, and the timing length will be greatly reduced, thereby greatly improving the coding rate of the chip and solving the problem of the low output bitstream rate of binary arithmetic coding when CABAC meets the requirements of chip power consumption, timing, and area.

[0053] To more clearly illustrate the technical principle of the embodiments of the present application, the following separately describes the bypass coding probability calculation including 3 bits in the prior art and the bypass coding probability calculation process of the embodiments of the present application.

[0054] Please continue to refer to Figure 2 , where when the value of the binary number is equal to 1, the updated ivlLow_post = ivlLow_pre << 1 + ivlCurrRange; when the value of the binary number is equal to 0, ivlLow_post = ivlLow_pre << 1.

[0055] And when referring to Figure 2 to calculate and update ivlLow for the binary numbers performing bypass coding continuously for two bits, the combination sorting can be performed according to whether the single bit is 0 or 1. There are 4 permutations and combinations for the two-bit binary numbers, as exemplified below: 00: ivlLow_post = (ivlLow_pre << 1) << 1 = ivlLow_pre << 2; 01: ivlLow_post = ((ivlLow_pre << 1) << 1) + ivlCurrRange = ivlLow_pre << 2 + ivlCurrRange; 10: ivlLow_post = (ivlLow_pre << 1 + ivlCurrRange) << 1 = ivlLow_pre << 2 + ivlCurrRange << 1 = ivlLow_pre << 2 + ivlCurrRange * 2; 11: ivlLow_post = ((ivlLow_pre << 1 + ivlCurrRange) << 1) + ivlCurrRange = ivlLow_pre << 2 + ivlCurrRange << 1 + ivlCurrRange = ivlLow_pre << 2 + ivlCurrRange * 3。

[0056] When calculating and updating ivlLow for the binary number that performs bypass encoding for three consecutive bits, combination sorting can be performed according to whether a single bit is 0 or 1. There are 8 permutations and combinations for a three-bit binary number. The following are examples: 000: ivlLow_post = ((ivlLow_pre << 1) << 1) << 1 = ivlLow_pre << 3; 001: ivlLow_post = ((ivlLow_pre << 1) << 1) << 1 + ivlCurrRange = ivlLow_pre << 3 + ivlCurrRange; 010: ivlLow_post = ((ivlLow_pre << 1) << 1 + ivlCurrRange) << 1 = ivlLow_pre << 3 + ivlCurrRange << 1 = ivlLow_pre << 3 + ivlCurrRange * 2; 011: ivlLow_post = ((ivlLow_pre << 1) << 1 + ivlCurrRange) << 1 + ivlCurrRange = ivlLow_pre << 3 + ivlCurrRange << 1 + ivlCurrRange = ivlLow_pre << 3 + ivlCurrRange * 3; 100: ivlLow_post = ((ivlLow_pre << 1 + ivlCurrRange) << 1) << 1 = ivlLow_pre << 3 + ivlCurrRange << 2 = ivlLow_pre << 3 + ivlCurrRange * 4; 101: ivlLow_post = ((ivlLow_pre << 1 + ivlCurrRange) << 1) << 1 + ivlCurrRange = ivlLow_pre << 3 + ivlCurrRange << 2 + ivlCurrRange = ivlLow_pre << 3 + ivlCurrRange * 5; 110: ivlLow_post = (((ivlLow_pre << 1 + ivlCurrRange) << 1) + ivlCurrRange) << 1 = ivlLow_pre << 3 + ivlCurrRange << 2 + ivlCurrRange << 1 = ivlLow_pre << 3 + ivlCurrRange * 6; 111: ivlLow_post = (((ivlLow_pre << 1 + ivlCurrRange) << 1) + ivlCurrRange) << 1 + ivlCurrRange = ivlLow_pre << 3 + ivlCurrRange << 2 + ivlCurrRange << 1 + ivlCurrRange = ivlLow_pre << 3 + ivlCurrRange * 7; It can be seen from the binary numbers of the execution bypass encoding of the above consecutive bits that assuming there are binary numbers of consecutive N-bit execution bypass encoding, there will be 2^N results for the final ivlLow_post, and one of them needs to be selected as the final ivlLow_post according to different permutation orders.

[0057] For example, please refer to Figure 3 , Figure 3 which is a schematic diagram of the architecture in the related technology involved in the present invention during consecutive 3-bit bypass encoding bin. Figure 3 It shows that the calculation process for consecutive 3-bit bypass encoding bin before architecture optimization needs to be deduced 8 times, and then a selector of 8 to 1 is used to select 1. Therefore, the chip area and timing consumption brought by this solution of the prior art are undoubtedly huge.

[0058] In contrast, the inventors of this embodiment found that the calculation of ivlLow_post is mainly divided into two parts. One part is ivlLow_pre << N, and the other part is ivlCurrRange * M. And ivlCurrRange remains unchanged all the time. That is to say, the calculation of the bypass encoding function is mainly the update process of ivlLow_pre.

[0059] By analyzing the rules carefully, it can be found that actually M is the decimal value corresponding to the binary number for which bypass encoding is continuously performed on N bits. Therefore, the 2^N-to-1 selector can be simplified into a multi-bit multiplier, optimizing the timing area.

[0060] For example, Figure 4 is a schematic diagram of the architecture of the solution provided by the present invention for continuous 3-bit bypass encoding bin. It can optimize the complicated eight kinds of addition and multiplication into the final simple calculation process of combining N and the decimal value corresponding to the binary data for which bypass encoding is performed on N bits, and calculating the bypass encoding probability.

[0061] Referring to the 3-bit bypass encoding probability update process in the related art, in this solution, N is equal to 3. The 3-bit binary number 110 is 6, that is, M is equal to 6. The first operation and the left shift operation can be performed to obtain the bypass encoding probability of the final 3-bit binary number 110.

[0062] In one embodiment, the bypass encoding probability calculation period of the above N-bit binary number can be divided into two clocks to perform different calculation processes respectively, which can ensure that the calculation bit width is sufficient and improve the calculation efficiency.

[0063] Specifically, the calculation period of probability update is divided into the first clock and the second clock, where the first clock precedes the second clock.

[0064] First, within the first clock, multiply the decimal value corresponding to the N-bit binary number by the fixed encoding interval length to obtain the first operation result, and store the first operation result into the second clock.

[0065] Further, within the second clock, first shift the historical encoding probability left by N bits to obtain the shift result, and then add the shift result and the first operation result to obtain the bypass encoding probability of the target binary sequence.

[0066] By dividing the probability update calculation period into two clocks in the embodiment of the present invention, and completing the multiplication calculation within the first clock and performing probability update within the second clock to obtain the bypass encoding probability of the target binary sequence, it can ensure that the calculation bit width is sufficient and improve the calculation efficiency.

[0067] The bypass encoding device provided by the present invention will be described below. The bypass encoding device described below can be referred to in correspondence with the bypass encoding method described above.

[0068] Referring to Figure 5 , Figure 5 is a schematic structural diagram of the bypass encoding device provided by the present invention.

[0069] The bypass encoding device includes: An acquisition module 510, configured to acquire a target binary sequence during the CABAC encoding process; the target binary sequence includes binary numbers for which continuous N-bit bypass encoding is performed, and N is an integer greater than 1.

[0070] A calculation module 520, configured to calculate the bypass encoding probability of the target binary sequence based on the N and the decimal value corresponding to the N-bit binary number.

[0071] An encoding module 530, configured to encode the target binary sequence according to the bypass encoding probability.

[0072] For the target binary sequence that needs to continuously perform bypass encoding, the bypass encoding device provided by the present invention updates the probability through the total number of bits of the target binary sequence and its corresponding decimal value, simplifies the probability update process of the binary numbers that need to continuously perform bypass encoding to a single multi-bit calculation, avoids the complex calculations of updating the probability bit by bit for binary numbers in the traditional method, reduces the calculation complexity by reducing the calculation units and logic resources required for bit-by-bit update, significantly reduces the chip area consumption and timing length, and thus greatly improves the encoding rate of the chip.

[0073] Further, the acquisition module 510 is further configured to: Load the syntax information required for the current CABAC encoding, and binaryize the syntax information to obtain an encoding sequence; Intercept the target binary sequence from the encoding sequence.

[0074] Further, the calculation module 520 is further configured to: Acquire a historical encoding probability, where the historical encoding probability is the latest encoding probability before the target binary sequence; Update the historical encoding probability based on the N and the decimal value corresponding to the N-bit binary number to obtain the bypass encoding probability of the target binary sequence.

[0075] Further, the calculation module 520 is further configured to: Perform a first operation using the decimal value corresponding to the N-bit binary number and a fixed encoding interval length to obtain a first operation result; Update the historical coding probability based on the first operation result and the N to obtain the side-channel coding probability of the target binary sequence.

[0076] Further, the calculation module 520 is further configured to: Multiply the decimal value corresponding to the N-bit binary number by a fixed coding interval length to obtain a first operation result.

[0077] Further, the calculation module 520 is further configured to: Shift the historical coding probability left by N bits to obtain a shifted result; Add the shifted result and the first operation result to obtain the side-channel coding probability of the target binary sequence.

[0078] It should be noted that the side-channel coding device provided by the present invention can execute the side-channel coding method described in any of the above embodiments during specific operation, which will not be elaborated in this embodiment.

[0079] Figure 6 is a schematic structural diagram of an electronic device provided by the present invention. As Figure 6 shown, the electronic device may include: a processor 610, a communication interface 620, a memory 630, and a communication bus 640. Among them, the processor 610, the communication interface 620, and the memory 630 complete mutual communication through the communication bus 640. The processor 610 can call the logical instructions in the memory 630 to execute the side-channel coding method, which includes: during the CABAC coding process, obtain a target binary sequence; the target binary sequence includes a binary number with continuous N bits for side-channel coding, and N is an integer greater than 1; calculate the side-channel coding probability of the target binary sequence based on the N and the decimal value corresponding to the N-bit binary number.

[0080] In addition, when the logical instructions in the above-mentioned memory 630 are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in various embodiments of the present invention. The aforementioned storage medium includes: various media such as USB flash drives, mobile hard disks, read-only memories (ROMs), random access memories (RAMs), magnetic disks, or optical discs that can store program codes.

[0081] On the other hand, the present invention also provides a computer program product. The computer program product includes a computer program stored on a non-transitory computer-readable storage medium. The computer program includes program instructions. When the program instructions are executed by a computer, the computer can execute the bypass coding method provided in the above-mentioned various embodiments. The method includes: during the CABAC coding process, obtaining a target binary sequence; the target binary sequence includes consecutive N bits of binary numbers for performing bypass coding, where N is an integer greater than 1; based on the N and the decimal value corresponding to the N bits of the binary numbers, calculating the bypass coding probability of the target binary sequence.

[0082] In yet another aspect, the present invention also provides a non-transitory computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, it is configured to execute the bypass coding method provided in the above-mentioned various embodiments. The method includes: during the CABAC coding process, obtaining a target binary sequence; the target binary sequence includes consecutive N bits of binary numbers for performing bypass coding, where N is an integer greater than 1; based on the N and the decimal value corresponding to the N bits of the binary numbers, calculating the bypass coding probability of the target binary sequence.

[0083] The system embodiments described above are merely illustrative. The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment. A person of ordinary skill in the art can understand and implement it without creative labor.

[0084] Through the description of the above embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on such an understanding, the above technical solution, in essence, or the part that contributes to the prior art can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0085] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions described in the foregoing embodiments, or perform equivalent replacements for some of the technical features; and these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A bypass encoding method, characterized in that, Comprising: During the CABAC encoding process, obtain a target binary sequence; The target binary sequence includes binary numbers that perform bypass encoding for consecutive N bits, where N is an integer greater than 1; Based on the N and the decimal value corresponding to the N-bit binary number, calculate the bypass encoding probability of the target binary sequence. Encode the target binary sequence according to the bypass encoding probability.

2. The bypass encoding method according to claim 1, wherein The calculating the bypass encoding probability of the target binary sequence based on the N and the decimal value corresponding to the N-bit binary number includes: Obtain a historical encoding probability, where the historical encoding probability is the latest encoding probability before the target binary sequence; Based on the N and the decimal value corresponding to the N-bit binary number, update the historical encoding probability to obtain the bypass encoding probability of the target binary sequence.

3. The bypass encoding method according to claim 2, wherein The updating the historical encoding probability based on the N and the decimal value corresponding to the N-bit binary number to obtain the bypass encoding probability of the target binary sequence includes: Perform a first operation using the decimal value corresponding to the N-bit binary number and a fixed coding interval length to obtain a first operation result; Based on the first operation result and the N, update the historical encoding probability to obtain the bypass encoding probability of the target binary sequence.

4. The bypass encoding method according to claim 3, wherein The performing a first operation using the decimal value corresponding to the N-bit binary number and a fixed coding interval length to obtain a first operation result includes: Multiply the decimal value corresponding to the N-bit binary number by the fixed coding interval length to obtain a first operation result.

5. The bypass encoding method according to claim 3 or 4, characterized in that The updating the historical encoding probability based on the first operation result and the N to obtain the bypass encoding probability of the target binary sequence includes: Shift the historical encoding probability left by N bits to obtain a shifted result; Add the shifted result and the first operation result to obtain the bypass encoding probability of the target binary sequence.

6. The bypass coding method according to any one of claims 1 to 4, characterized in that, The obtaining the target binary sequence includes: Load the syntax information required for the current CABAC encoding, and binaryize the syntax information to obtain a coding sequence; Intercept the target binary sequence from the coding sequence.

7. The bypass encoding method according to claim 1, wherein The target binary sequence is encoded and operated in a step-by-step pipelining manner.

8. An electronic device, the electronic device comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, When the processor executes the computer program, the steps of the bypass encoding method according to any one of claims 1 to 7 are implemented.

9. A non-transitory computer-readable storage medium, on which a computer program is stored, characterized in that, When the computer program is executed by the processor, the steps of the bypass encoding method according to any one of claims 1 to 7 are implemented.

10. A computer program product, the computer program product comprising a computer program, characterized in that, When the computer program is executed by the processor, the steps of the bypass encoding method according to any one of claims 1 to 7 are implemented.