Video decoding method, device, equipment and storage medium
By setting the codeword length according to the operating system bit count and combining the conventional and multi-bypass entropy decoding technology of the entropy decoding engine, the problem of slow video decoding speed in mobile terminals is solved, efficient video decoding is achieved, and power consumption is reduced and The heat is increased, improving the playback experience.
Patent Information
- Application Number
- CN202210720358.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-22
- Publication Date
- 2024-12-20
- Estimated Expiration
- 2042-06-22
AI Technical Summary
In mobile terminals, the video decoding acceleration solution has poor effect, especially because the decoding speed is slow due to the entropy decoding module. The common hardware circuit unit design and software multi-threaded parallel method will increase terminal power consumption and heat generation, making it difficult to move. Effective deployment in the terminal.
By setting the codeword length according to the operating system bit count, obtaining the codeword to be decoded from the video frame code stream to be decoded, and submitting it to the entropy decoding engine for entropy decoding, using conventional entropy decoding and multi-bypass entropy decoding, combined with Reconstruction processing reduces the number of memory reads and calculations, and improves decoding speed.
Without the need to design hardware circuits separately and turn on multiple decoding threads, the video decoding speed is significantly improved, the calculation amount and time consumption of entropy decoding processing is reduced, and the battery of the video decoding device can support playback time is extended, providing more Smooth viewing experience.
Smart Images

Figure CN115334313B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of video decoding technology, and in particular to a video decoding method, apparatus, device and storage medium. Background Art
[0002] In the development process from PC Internet to mobile Internet, the form of information has changed from text-based to images, and now video information occupies the majority of traffic, which has led to the gradual expansion of video decoding technology from the original broadcasting and television system to mobile products. Video decoding technology refers to the process of using hardware decoders or software decoders to perform binary analysis and pixel reconstruction according to specific syntax on the binary code stream downloaded from the network, and then piece together the entire frame to provide to the upper-level application for video playback.
[0003] Video decoding mainly includes two modules: entropy decoding and reconstruction. The reconstruction module is mostly regular numerical calculation and processing, and the degree of optimization is relatively deep. For the entropy decoding module, taking the CABAC (context-based binary arithmetic coding) entropy decoding adopted in the HEVC (high-efficiency video coding international standard) standard as an example, the parsing of the video code stream is a typical serial mode, which is difficult to achieve parallel acceleration, and becomes the speed bottleneck of the decoder deployment. Especially on the mobile terminal with limited computing power, the problem of slow decoding speed caused by the entropy decoding module is particularly prominent. At present, the efficiency of video decoding is generally improved by hardware circuit unit design or software multi-threaded parallelism. However, the hardware circuit unit design method needs to rely on a special circuit structure, and the implementation schemes of different terminals are also quite different, which is greatly restricted in the field of mobile terminals. The software multi-threaded parallel method will lead to an increase in terminal power consumption, which is easy to cause the terminal to consume power too quickly and heat up significantly. Software multi-threaded parallelism is also easily restricted in the field of mobile terminals. Summary of the invention
[0004] The embodiments of the present application provide a video decoding method, apparatus, device and storage medium to solve the technical problem that the video decoding acceleration solution in the related art has a poor effect in mobile terminals. The video decoding speed is effectively improved without the need to design a separate hardware circuit and without the need to start multiple decoding threads.
[0005] In a first aspect, an embodiment of the present application provides a video decoding method, including:
[0006] Obtaining a codeword to be decoded from a code stream of a video frame to be decoded according to a set codeword length, wherein the set codeword length is set according to the number of bits of an operating system;
[0007] The codeword to be decoded is added to an entropy decoding engine, and the entropy decoding engine performs entropy decoding on the codeword to be decoded to obtain an entropy decoding result, wherein the entropy decoding includes conventional entropy decoding and multi-bypass entropy decoding, and the conventional entropy decoding and the multi-bypass entropy decoding are configured based on different coding syntaxes respectively;
[0008] The entropy decoding result is reconstructed to obtain a reconstructed frame.
[0009] In a second aspect, an embodiment of the present application provides a video decoding device, including a codeword extraction module, an entropy decoding module and a reconstruction processing module, wherein:
[0010] The codeword extraction module is configured to obtain the codeword to be decoded from the code stream of the video frame to be decoded according to a set codeword length, and the set codeword length is set according to the number of bits of the operating system;
[0011] The entropy decoding module is configured to add the codeword to be decoded to an entropy decoding engine, and the entropy decoding engine performs entropy decoding on the codeword to be decoded to obtain an entropy decoding result, wherein the entropy decoding includes conventional entropy decoding and multi-bypass entropy decoding, and the conventional entropy decoding and the multi-bypass entropy decoding are configured based on different coding syntaxes respectively;
[0012] The reconstruction processing module is configured to perform reconstruction processing on the entropy decoding result to obtain a reconstructed frame.
[0013] In a third aspect, an embodiment of the present application provides a video decoding device, including: a memory and one or more processors;
[0014] The memory is used to store one or more programs;
[0015] When the one or more programs are executed by the one or more processors, the one or more processors implement the video decoding method as described in the first aspect.
[0016] In a fourth aspect, an embodiment of the present application provides a storage medium storing computer executable instructions, wherein the computer executable instructions are used to execute the video decoding method as described in the first aspect when executed by a computer processor.
[0017] In a fifth aspect, an embodiment of the present application provides a computer program product, which includes a computer program stored in a computer-readable storage medium. At least one processor of a device reads and executes the computer program from the computer-readable storage medium, so that the device performs the video decoding method as described in the first aspect.
[0018] The embodiment of the present application obtains the codeword to be decoded from the code stream of the video frame to be decoded according to the set codeword length determined according to the number of bits of the operating system, submits the codeword to be decoded to the entropy decoding engine for entropy decoding to obtain the entropy decoding result, and reconstructs the entropy decoding result to obtain the reconstructed frame. The length of the read codeword to be decoded is aligned with the number of bits of the operating system. Each subsequent time the codeword to be decoded is read, the memory addressing is aligned to the number of bits of the operating system, which effectively reduces the single read time and the number of memory reads, and performs entropy decoding processing on multiple codewords to be decoded through multi-bypass decoding, which reduces the computational complexity and time consumption of the entropy decoding processing, and effectively improves the video decoding speed without the need to design a separate hardware circuit and without the need to start multiple decoding threads. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] Figure 1 is a flowchart of a video decoding method provided by an embodiment of the present application;
[0020] Figure 2 It is a schematic diagram of a flow chart of entropy decoding of a codeword to be decoded provided by an embodiment of the present application;
[0021] Figure 3 It is a schematic diagram of a conventional decoding process in the related art;
[0022] Figure 4 This is a schematic diagram of a conventional decoding process provided by an embodiment of the present application;
[0023] Figure 5 is a structural diagram of a video decoding device provided in an embodiment of the present application;
[0024] Figure 6 It is a structural diagram of a video decoding device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0025] In order to make the purpose, technical scheme and advantages of the present application clearer, the specific embodiments of the present application are further described in detail below in conjunction with the accompanying drawings. It is understood that the specific embodiments described herein are only used to explain the present application, rather than to limit the present application. It should also be noted that, for the convenience of description, only the part related to the present application but not all the contents are shown in the accompanying drawings. Before discussing the exemplary embodiments in more detail, it should be mentioned that some exemplary embodiments are described as processes or methods depicted as flow charts. Although the flow chart describes each operation (or step) as a sequential process, many of the operations therein can be implemented in parallel, concurrently or simultaneously. In addition, the order of each operation can be rearranged. The above process can be terminated when its operation is completed, but it can also have additional steps not included in the accompanying drawings. The above process can correspond to a method, a function, a procedure, a subroutine, a subprogram, etc.
[0026] Figure 1 A flowchart of a video decoding method provided in an embodiment of the present application is given. The video decoding method provided in an embodiment of the present application can be executed by a video decoding device, which can be implemented by hardware and / or software and integrated in a video decoding device (such as a mobile phone or a tablet).
[0027] The following description is made by taking a video decoding device executing a video decoding method as an example. Figure 1 , the video decoding method comprises:
[0028] S110: Obtain a codeword to be decoded from a code stream of a video frame to be decoded according to a set codeword length, wherein the set codeword length is set according to the number of bits of an operating system.
[0029] The video frame code stream to be decoded provided by the present solution is obtained by unpacking and framing a binary code stream, so that, for example, after a video-related application in a video decoding device receives a binary code stream sent by an Internet server (for example, when a video-related application in a video decoding device performs operations such as watching live broadcasts, on-demand broadcasts, or video conferencing, the application layer in the video decoding device sends a video acquisition request to the server and pulls a specific binary code stream, and caches the acquired binary code stream in a local memory according to specific needs), the binary code stream is unpacked and framed, and the encapsulation information of the split binary code streams encapsulated in different transmission packets is removed to form a complete video frame code stream to be decoded, waiting for decoding processing (including CABAC entropy decoding and reconstruction processing based on the HEVC standard).
[0030] Exemplarily, after obtaining the video frame code stream to be decoded, the codeword to be decoded is extracted from the video frame code stream to be decoded according to the set codeword length. Among them, the set codeword length provided by this scheme is set according to the number of bits of the operating system. For example, when the operating system of the video decoding device is a 64-bit or 32-bit operating system, the codeword length is set to 64 bits or 32 bits, that is, a 64-bit or 32-bit address is used for memory addressing. Each time a 64-bit or 32-bit codeword to be decoded is obtained from the video frame code stream to be decoded in the local memory, it is only necessary to ensure that the first address of the code stream cache is 64-bit or 32-bit aligned. Each subsequent addressing when reading the codeword to be decoded is aligned to 64 bits or 32 bits, which is more friendly to memory addressing and cache prefetching. Compared with the traditional decoder reading 32 bits or 16 bits each time (the number of bits is less than the number of bits of the operating system), under the premise of ensuring the quality of the decoded video, it can significantly reduce the number of memory reads and the single read time, thereby improving the video decoding efficiency.
[0031] In a possible embodiment, when the data storage method corresponding to the encoding method of the binary code stream is inconsistent with the storage method of the operating system, the storage method of the codeword to be decoded can be converted to adapt to the operating system. Based on this, after obtaining the codeword to be decoded from the video frame code stream to be decoded according to the set codeword length, this solution also includes: converting the storage method of the codeword to be decoded from the big endian order to the little endian order.
[0032] For example, taking the CABAC encoding based on the HEVC standard, the video decoding device provided by this solution is built on the x86 or arm architecture as an example. Since the HEVC encoded bitstream is stored in big endian order, and the x86 and arm architectures both use little endian order by default, it is necessary to convert the retrieved 64-bit or 32-bit codewords to be decoded from big endian order to little endian order to ensure correct parsing of the bitstream.
[0033] S120: Add the codeword to be decoded to the entropy decoding engine, and the entropy decoding engine performs entropy decoding on the codeword to be decoded to obtain an entropy decoding result. The entropy decoding includes conventional entropy decoding and multi-bypass entropy decoding. The conventional entropy decoding and the multi-bypass entropy decoding are configured based on different coding syntaxes, respectively.
[0034] Exemplarily, after extracting the codeword to be decoded from the code stream of the video frame to be decoded, the codeword to be decoded is added to the entropy decoding engine, and the entropy decoding engine performs entropy decoding on the codeword to be decoded and obtains an entropy decoding result.
[0035] The entropy decoding engine provided by the present solution performs entropy decoding on the codeword to be decoded in the following decoding modes, including normal entropy decoding (Normal bin entropy decoding) and multi-bypass entropy decoding (Bypass multi-bins decoding), and the normal entropy decoding and multi-bypass entropy decoding are configured based on different coding syntaxes respectively. Among them, normal entropy decoding can parse out one entropy decoding result at a time, and multi-bypass decoding can parse out one or more entropy decoding results at a time. The arrangement order of different coding syntaxes in the binary code stream and the coding and decoding types can be specified by the international video coding standard HEVC / H265. The entropy decoding engine can be designed according to the decoding order specified by the international video coding standard, and different decoding modes can be called for entropy decoding at different decoding stages. For example, when entropy decoding a transform block, the syntax to be parsed in sequence is the block division flag, the cbf flag, the absolute value of the quantization coefficient, and the positive and negative signs of the quantization coefficient. The order in which the entropy decoding engine calls the decoding mode is normal entropy decoding, normal entropy decoding, normal entropy decoding, and multi-bypass entropy decoding.
[0036] In one possible embodiment, Figure 2As shown in a flow diagram of entropy decoding of a codeword to be decoded, the entropy decoding engine provided by the present solution performs entropy decoding on the codeword to be decoded to obtain an entropy decoding result, including steps S1021-S1022:
[0037] S121: Obtain bits to be decoded from the codeword to be decoded in sequence, and determine a decoding method according to the coding syntax to which the bits to be decoded belong.
[0038] S122: Decoding the to-be-decoded bits based on the determined decoding method to obtain an entropy decoding result.
[0039] Exemplarily, the codeword to be decoded includes one or more bits to be decoded (bits) generated based on different coding syntaxes. After obtaining the codeword to be decoded, the entropy decoding engine obtains the bits to be decoded from the codeword to be decoded in sequence, determines the coding syntax to which these bits to be decoded belong, and determines the decoding methods corresponding to these coding syntaxes. After determining the decoding methods corresponding to these bits to be decoded, these bits to be decoded are decoded based on the corresponding decoding methods to obtain entropy decoding results. After obtaining the entropy decoding results corresponding to each bit to be decoded, the entropy decoding results corresponding to the codeword to be decoded can be obtained based on the entropy decoding results of multiple bits to be decoded. After completing the entropy decoding of the current codeword to be decoded, the next segment of codewords to be decoded can be extracted from the video frame code stream to be decoded according to the set codeword length for entropy decoding, and the entropy decoding results obtained by entropy decoding can be used for the next reconstruction process.
[0040] In a possible embodiment, the video decoding method provided by the present solution initializes the entropy decoding engine each time a picture frame to be decoded (each picture frame includes multiple codewords to be decoded), for example, the interval offset value and encoding interval of the entropy decoding engine are initialized according to the set codeword length to complete the initialization of the entropy decoding engine.
[0041] Among them, the entropy decoding engine mainly performs entropy decoding based on two elements: the coding interval (range) and the interval offset value (offset). The coding interval under the HEVC standard is continuously recursively divided during the entropy decoding process. Each division divides the coding interval into a high-probability symbol interval (rmps) and a low-probability symbol interval (rlps). By observing whether the interval offset value falls into the high-probability symbol interval or the low-probability symbol interval, the decoding value corresponding to the entropy decoding result (bin=0 or bin=1) is determined. After each entropy decoding result is determined, it is determined whether the coding interval is less than the set accuracy threshold, for example, the set accuracy threshold is set to 256. If the updated coding interval is less than 256, the coding interval needs to be normalized and the coding interval is expanded to ensure the parsing accuracy of the next entropy decoding result. Among them, the normalization operation of the coding interval is similar to re-initializing the coding interval, that is, re-expanding the coding interval to the precision aligned with the bit number of the operating system (for example, re-expanding the coding interval to 9 bits), and updating the interval offset value and the cache codeword, which includes a large number of shift operations and code stream reading processes. This scheme significantly increases the number of recursive divisions of the coding interval by increasing the initial number of bits of the coding interval and the interval offset value, reduces the probability that the coding interval is less than 256, reduces the number of normalizations, and reduces the time consumption of entropy decoding processing. Based on this, this scheme has been optimized on the basis of the HEVC standard. The HEVC standard uses 510, that is, 9 bits in length, as the coding interval, and the interval offset value is initialized to the value represented by the first 9 bits of the codeword. In order to reduce the number of normalization calculations and to align memory operations and variable operations to the number of bits of the operating system (taking a 64-bit operating system as an example), this scheme adopts the method of offsetting the coding interval, extending it from 9 bits to 64 bits in length, that is, the initial value of the coding interval becomes 510<<55, and the initial offset value of the interval offset value is correspondingly changed to the value represented by the first 64 bits of the codeword, so that the number of recursive divisions of the supported intervals increases, thereby effectively reducing the number of normalizations. In addition, since the initialization of the interval offset value requires a codeword of at least 64 bits in length, the cache unit of the codeword to be decoded needs to be changed to 64 bits, that is, 64 bits of the codeword to be decoded are taken out from the binary code stream for standby each time.
[0042] In a possible embodiment, the entropy decoding engine determines a decoding method for the to-be-decoded bit according to the coding syntax to which the to-be-decoded bit belongs. Based on this, the entropy decoding engine provided by the present solution decodes the to-be-decoded bit based on the determined decoding method to obtain an entropy decoding result, including:
[0043] S1221: Based on the decoding method of the to-be-decoded bits being conventional entropy decoding, the to-be-decoded bits are quantized in coding intervals, corresponding probability symbol intervals are determined according to the quantized coding intervals, and entropy decoding results of the to-be-decoded bits are determined according to a comparison result between the probability symbol intervals and the interval offset values.
[0044] S1222: Based on the decoding method of the to-be-decoded bits being multi-pass entropy decoding, multi-pass entropy decoding is performed on the to-be-decoded bits according to the number of entropy decoding results that need to be parsed to obtain entropy decoding results.
[0045] Exemplarily, when it is determined that the decoding method for the to-be-decoded bit is conventional entropy decoding, the to-be-decoded bit is quantized for coding interval, and the probability symbol interval (the probability symbol interval includes a high probability symbol interval or a low probability symbol interval) corresponding to the quantized coding interval is determined according to a pre-set probability state transition table. The corresponding probability symbol interval is compared with the interval offset value, and the entropy decoding result of the current to-be-decoded bit is determined according to the comparison result of the probability symbol interval and the interval offset value, that is, according to the comparison result of the probability symbol interval and the interval offset value, it is determined whether the interval offset value falls into the high probability symbol interval or the low probability symbol interval, and when the offset value falls into the high probability symbol interval, the high probability symbol value is used as the decoding value corresponding to the entropy decoding result (that is, the decoding value bin=val_mps), and when the offset value falls into the low probability symbol interval, the low probability symbol value is used as the decoding value corresponding to the entropy decoding result (that is, the decoding value bin=val_lps). Among them, the high probability symbol value val_mps is a dynamically changing value related to the probability state and the quantization coefficient. It is continuously updated as the probability state changes, and is opposite to the low probability symbol value val_lps, that is, when val_mps=0, val_lps=1, and when val_mps=1, val_lps=0.
[0046] In a possible embodiment, after decoding the to-be-decoded bit based on a determined decoding method to obtain an entropy decoding result, the coding interval and the interval offset value can be updated according to the probability symbol interval corresponding to the quantized coding interval. When the offset value falls into the high probability symbol interval, the coding interval is updated using the high probability symbol interval, and when the offset value falls into the low probability symbol interval, the coding interval is updated using the low probability symbol interval, and the interval offset value is updated using the high probability symbol interval. For example, after the coding interval of the to-be-decoded bit is quantized, the low probability symbol interval is obtained by searching the probability state transition table in combination with the current probability state index state (the high probability symbol interval can be determined according to the difference between the coding interval and the low probability symbol interval), and the interval offset value is compared with the high probability symbol interval. When the interval offset value is greater than or equal to the high probability symbol interval, the low probability symbol value is used as the decoding value corresponding to the entropy decoding result, and the difference between the interval offset value and the high probability symbol interval is used as the updated interval offset value, and the low probability symbol interval is used as the updated interval offset value; and when the interval offset value is less than the high probability symbol interval, the high probability symbol value is used as the decoding value corresponding to the entropy decoding result, and the high probability symbol interval is used as the updated interval offset value.
[0047] Based on this, the entropy decoding engine provided by the present solution determines the entropy decoding result of the to-be-decoded bit according to the comparison result of the probability symbol interval and the interval offset value, including:
[0048] S12211: In response to the comparison result that the interval offset value is greater than or equal to the high probability symbol interval, the entropy decoding result of the bit to be decoded is set to the low probability symbol value, and the interval offset value is updated by the difference between the interval offset value and the high probability symbol interval, and the coding interval is updated by the low probability symbol interval.
[0049] S12212: In response to the comparison result that the interval offset value is less than the high probability symbol interval, the entropy decoding result of the bit to be decoded is set to the high probability symbol value, and the coding interval is updated by the high probability symbol interval.
[0050] Exemplarily, after the coding interval of the to-be-decoded bit is quantized and the corresponding probability symbol interval is determined according to the quantized coding interval, the high probability symbol interval in the probability symbol interval is compared with the interval offset value.
[0051] When the interval offset value is greater than or equal to the high probability symbol interval, it is considered that the offset value falls into the low probability symbol interval, and the low probability symbol value is used as the entropy decoding result of the bit to be decoded (i.e., entropy decoding result bin=val_lps), and the interval offset value is updated by the difference between the interval offset value and the high probability symbol interval (i.e., offset-=offset-rmps), to complete the update of the interval offset value, and the interval offset value is updated by the low probability symbol interval (i.e., range=rlps), to complete the update of the coding interval.
[0052] When the interval offset value is less than the high probability symbol interval, it is considered that the offset value falls into the high probability symbol interval, and the high probability symbol value is used as the entropy decoding result of the bit to be decoded (i.e., entropy decoding result bin = val_mps), and the interval offset value is updated through the high probability symbol interval (i.e., range = rmps) to complete the update of the coding interval.
[0053] In a possible embodiment, after the entropy decoding engine provided by the present solution decodes the bits to be decoded based on a determined decoding method to obtain an entropy decoding result, it further includes: in response to the coding interval being less than a set accuracy threshold, normalizing the interval offset value and the coding interval.
[0054] Exemplarily, after each time the bits to be decoded are parsed to obtain the entropy decoding result and the coding interval is updated, the updated coding interval is compared with a set accuracy threshold (for example, 256). When the coding interval is less than the set accuracy threshold, it means that the current coding interval is too small and cannot meet the parsing accuracy of the next entropy decoding result. It is necessary to normalize the interval offset value and the coding interval, that is, to re-expand the interval offset value and the coding interval to 64 bits, and at the same time read a new 64-bit codeword to be decoded from the binary code stream to ensure the parsing accuracy of the parsed entropy decoding result.
[0055] In related technologies, such as Figure 3 As shown in the conventional decoding process diagram of the related technology provided, the international video coding standard HEVC stipulates that the initial coding interval is 510, which is represented by 9 bits, and the interval range of 0-512 is represented by 9 bits. The interval offset value is assigned according to the first 9 bits of the codeword. The interval quantization process of the coding interval is based on qnt_range=(range>>6)&3, which is equivalent to 2 6 The coding interval is quantized in units, and the 2-bit result after the prefix 1 is taken as the interval quantization value. Combined with the current probability state index state, the probability state transition table is searched to obtain the low-probability symbol interval (rlps=table[state][qnt_range]), and the high-probability symbol interval (rmps) is obtained by subtracting the interval range. According to the interval offset value offset and the high-probability symbol interval rmps comparison result, it is determined whether the result falls into the high-probability symbol interval or the low-probability symbol interval, and then different interval range update strategies are adopted to set the high-probability symbol interval or the low-probability symbol interval value as the new interval range (if the high-probability symbol interval value is hit, the high-probability symbol interval value is used as the new interval range, and if the low-probability symbol interval value is hit, the low-probability symbol interval value is used as the new interval range); when the interval range is less than 256, it means that the interval range accuracy needs to be improved, and a normalization operation (re-normalization) will be performed to output the parsed entropy decoding result bin, and the interval range will be renormalized to 510.
[0056] Figure 4 A schematic diagram of a conventional decoding process provided in an embodiment of the present application is shown in FIG. Figure 4As shown, in this solution, the coding interval, interval offset value, and probability symbol interval are extended to the same number of bits as the operating system (such as 64 bits) for calculation and comparison. That is, the length of the codeword to be decoded obtained each time is 64 bits, the coding interval assignment is extended to 64 bits, and the interval offset value is assigned according to the first 64 bits of the codeword to be decoded. In this solution, the coding interval is extended from the original 9 bits to 64 bits, starting from the initial value 510<<55 for recursive division. During the division process, the coding interval continuously becomes smaller and useless prefix 0 appears. At this time, the coding interval includes three parts: prefix 0, 9-bit valid bits, and suffix 0. According to the principle that the first bit of the 9 bits is non-0, the number of bits clz of the prefix 0 can be obtained through the CLZ instruction, and the number of suffix 0 is 64 - 9 - clz = 55 - clz. Then the coding interval quantization process becomes (range>>(55 - clz)>>6)&3 = (range>>(61 - clz))&3.
[0057] Then, according to the coding interval quantization value and the probability state value, looking up the probability state transition table, the small probability symbol interval can be obtained (rlps = table[state][qnt_range]<<(55 - clz)). At this time, the rlps obtained by looking up the probability state transition table is still a 9-bit range value, and it needs to be aligned to the effective 9-bit position in the 64-bit coding interval. In fact, just add the same suffix 0 to the small probability symbol interval rlps, that is, rlps<<(55 - clz). The calculation formula for the large probability symbol interval rmps remains unchanged, still being range - rlps. Compare the interval offset value offset with the large probability symbol interval rmps. If offset≥rmps, it means that offsetting with this offset will fall into the small probability symbol interval rlps, and the entropy decoding result bin = val_lps, and the coding interval range is updated using the small probability symbol interval rlps. If offset<rmps, it means that offsetting with this offset will fall into the large probability symbol interval, and the entropy decoding result bin = val_mps, and range is updated using the large probability symbol interval rmps. At the same time, after each entropy decoding result is parsed, check whether the coding interval is less than 256. If the coding interval is less than 256, it is considered that the current coding interval is too small to meet the parsing accuracy of the next entropy decoding result, and a normalization operation (re-normalization) needs to be performed to re-expand the coding interval and the interval offset value to 64 bits, and at the same time read a new 64-bit codeword to be decoded from the binary code stream.
[0058] It is understandable that the mainstream mobile devices in the current market are all 64-bit designs, and the cache units of the mobile device processors are generally 64 bits. Therefore, this solution can facilitate memory reading and writing and data processing by aligning the operating system bit number. In addition, compared with the recursive division of the coding interval by 9 bits in the related art, the recursive division of the coding interval by 64 bits can support more divisions, which can greatly reduce the probability that the coding interval is less than 256, effectively reduce the number of normalizations and the absolute amount of calculation, and reduce the possibility of entering the normalized branch, so that the branch prediction is more accurate and the time consumption caused by branch prediction errors is reduced.
[0059] When it is determined that the decoding method for the bits to be decoded is multi-bypass entropy decoding, the number of entropy decoding results that need to be parsed is determined according to the entropy decoding result obtained by the previous decoding (before starting the multi-bypass entropy decoding, it is first determined how many bits to be decoded that the multi-bypass decoding should parse according to the entropy decoding results that have been decoded, and the decoding result of the bits to be decoded is the entropy decoding result), and the multi-bypass entropy decoding is performed on the bits to be decoded according to the number of entropy decoding results that need to be parsed to obtain the entropy decoding result.
[0060] When performing multi-bypass entropy decoding on the bits to be decoded, the calculation and assignment processes required for entropy decoding of a single bit to be decoded can be merged according to the number of entropy decoding results that need to be analyzed, and repeated calculations and assignments can be completed at one time using a single instruction, replacing the original repeated calculation and assignment processes for entropy decoding of multiple bits to be decoded.
[0061] In a possible embodiment, the entropy decoding engine provided by the present solution performs multi-pass entropy decoding on the bits to be decoded according to the number of entropy decoding results that need to be parsed to obtain the entropy decoding results, including:
[0062] S12221: In response to the number of entropy decoding results that need to be parsed being a first preset value, a shift operation is performed on the interval offset value, the interval offset value after the shift operation and the result of an OR operation of the bits to be decoded are assigned to the interval offset value, and the entropy decoding result of the bits to be decoded is determined based on the comparison result of the assigned interval offset value and the encoding interval.
[0063] S12222: In response to the number of entropy decoding results that need to be parsed being greater than a first preset value, a shift operation corresponding to the number of entropy decoding results is performed on the interval offset value, the interval offset value after the shift operation and the result of an OR operation of the bits to be decoded corresponding to the number of entropy decoding results are assigned to the interval offset value, and the entropy decoding result of the bits to be decoded corresponding to the number of entropy decoding results is determined based on the division result of the assigned interval offset value and the encoding interval.
[0064] Exemplarily, when performing multi-bypass entropy decoding on the bit to be decoded, the number of entropy decoding results that need to be parsed is determined, and when the number of entropy decoding results that need to be parsed is a first preset value (for example, the first preset value is 1, that is, the current multi-bypass entropy decoding only needs to perform entropy decoding on one bit to be decoded), a shift operation is performed on the interval offset value (the interval offset value is shifted left once, that is, offset=offset<<1).
[0065] Further, the interval offset value after the shift operation and the bit to be decoded are subjected to an OR operation, and the OR operation result of the interval offset value and the bit to be decoded is assigned to the interval offset value (i.e., offset|=read_bits). The interval offset value obtained according to the assignment is compared with the coding interval, and the entropy decoding result of the bit to be decoded is determined according to the comparison operation result between the interval offset value and the coding interval. For example, when the interval offset value is greater than the coding interval, the entropy decoding result is determined to be a second preset value (e.g., bin=1), and when the interval offset value is less than or equal to the coding interval, the entropy decoding result is determined to be a third preset value (e.g., bin=0).
[0066] In a possible embodiment, the entropy decoding engine provided by the present solution determines the entropy decoding result of the bit to be decoded based on the comparison operation result of the interval offset value obtained by the assignment and the coding interval, including: in response to the interval offset value obtained by the assignment being greater than the comparison operation result of the coding interval, setting the entropy decoding result of the bit to be decoded to a second preset value, and updating the interval offset value by the difference between the interval offset value and the high-probability symbol interval; in response to the interval offset value obtained by the assignment being less than or equal to the comparison operation result of the coding interval, setting the entropy decoding result of the bit to be decoded to a third preset value.
[0067] Exemplarily, when the interval offset value obtained by the assignment is greater than the coding interval, the entropy decoding result of the bit to be decoded is set to a second preset value (for example, the entropy decoding result of the bit to be decoded is set to 1), and the interval offset value is updated by the difference between the interval offset value and the high probability symbol interval (i.e., offset-=range). When the interval offset value obtained by the assignment is less than or equal to the coding interval, the entropy decoding result of the bit to be decoded is set to a third preset value (for example, the entropy decoding result of the bit to be decoded is set to 0). In the multi-bypass decoding process, the symbol probability corresponding to the probability symbol interval is always equal to 0.5, the high probability symbol interval and the low probability symbol interval are equal, the size of the coding interval is fixed, and the coding interval does not need to be updated.
[0068] Exemplarily, when the number of entropy decoding results to be parsed is greater than the first preset value, a shift operation corresponding to the number of entropy decoding results is performed on the interval offset value (the interval offset value is shifted to the left the same number of times as the number of entropy decoding results to be parsed), the interval offset value after the shift operation and the bits to be decoded corresponding to the number of entropy decoding results to be parsed are ORed (the interval offset value is ORed with multiple bits to be decoded at the same time), and the OR result is assigned to the interval offset value, and the entropy decoding result of the bits to be decoded corresponding to the number of entropy decoding results is determined according to the division result of the interval offset value obtained by the assignment and the coding interval. Among them, the process of comparing the interval offset value with the coding interval to obtain the entropy decoding result is similar to division, and the result of dividing the interval offset value with the coding interval (i.e., offset / range) is equivalent to the entropy decoding result after comparing the interval offset value with the coding interval multiple times (consistent with the number of entropy decoding results).
[0069] It needs to be explained that there are two situations in multi-bypass decoding: parsing one entropy decoding result and parsing multiple consecutive entropy decoding results. The entropy decoding process of parsing one entropy decoding result includes a left shift of the interval offset value, an OR operation of the interval offset value and a single bit to be decoded in the codeword to be decoded, a comparison operation of the interval offset value and the coding interval, and the assignment of the entropy decoding result. Parsing multiple consecutive entropy decoding results is similar to the process of parsing one entropy decoding result, which belongs to the repeated cycle of the above process, which makes it possible to merge operations and parse multiple entropy decoding results at one time. The repeated shift and OR operation can be directly completed at one time using a single instruction. Assuming that the number of entropy decoding results to be parsed is 5, offset<<1, offset|=read_bits(1) is executed 5 times, and the above operation can be merged into offset<<5, offset|=read_bits(5). The process of comparing the interval offset value with the coding interval to obtain the entropy decoding result is similar to division, and the result of offset / range is equivalent to the entropy decoding result after comparing the interval offset value with the coding interval 5 times. In addition, the multi-bypass decoding will only perform the interval offset value update operation (i.e., offset-=range) when the entropy decoding result is the second preset value (i.e., bin=1). Therefore, after finally using division to obtain the total value of 5 entropy decoding results, the updated final interval offset value can be obtained at one time using the formula offset=offset-bins*range. When performing multi-bypass decoding on multiple bits to be decoded, this solution uses one shift, one OR operation, one division, and one multiplication, replacing the original multiple shifts, multiple OR operations, multiple comparisons, and assignment processes, which can significantly reduce the decoding time and improve the decoding speed.
[0070] S130: Reconstruct the entropy decoding result to obtain a reconstructed frame.
[0071] Exemplarily, after obtaining the entropy decoding result, the entropy decoding result can be reconstructed to obtain a reconstructed frame. Entropy decoding is based on binary parsing rules to parse the binary code stream (codeword to be decoded) into values of various types and lengths. The entropy decoding engine assigns actual meanings to these parsed values in accordance with the grammatical order specified by the international video coding standard HEVC, such as the width and height of the video, quantization step size, reference frame number, residual coefficient and other information, which can be used as data to complete the next step of video reconstruction.
[0072] For example, the reconstruction processing of the entropy decoding result includes inverse transformation, inverse quantization, predictive decoding, post-processing filtering and other processes, which are responsible for completing the reconstruction of a frame of pixel values. Among them, the inverse transformation is responsible for mapping the parsed transform coefficients (the entropy decoding engine will parse a large amount of syntax information according to the codeword to be decoded, and the transform coefficients account for the highest proportion of these syntax information. The transform coefficients are the mapping of all pixel residual values of each video frame in the transform domain) from the transform domain to the pixel domain to obtain pixel residual coefficients, and the inverse quantization is responsible for further compensating the pixel residual coefficients into residual values that are as continuous as possible according to the quantization step size. The predictive decoding is responsible for obtaining the prediction block through intra-frame / inter-frame prediction, and superimposing it with the pixel residual coefficients to complete the preliminary reconstruction. The post-processing filtering determines the use of deblocking filtering and sample adaptive compensation according to the filtering parameters to remove the block effect and ringing effect of the reconstructed frame, and completes the reconstruction of a frame to obtain a reconstructed frame.
[0073] In one possible embodiment, after the entropy decoding result is reconstructed to obtain a reconstructed frame, the decoding success signal and the memory address of the reconstructed frame can be sent to the application layer, and the application layer displays the video screen based on the reconstructed frame. After receiving the decoding success signal returned by the decoder (including the entropy decoding engine and the reconstruction module), the application layer copies the decoded video frame from the memory address provided by the decoder, and then displays it after a series of image processing such as rendering, scaling, and beauty.
[0074] In the above, the codeword to be decoded is obtained from the code stream of the video frame to be decoded according to the set codeword length determined according to the number of bits of the operating system, and the codeword to be decoded is submitted to the entropy decoding engine for entropy decoding to obtain the entropy decoding result, and the entropy decoding result is reconstructed to obtain the reconstructed frame, the length of the codeword to be decoded is aligned with the number of bits of the operating system, and each subsequent time the codeword to be decoded is read, the memory addressing is aligned to the number of bits of the operating system, effectively reducing the single reading time and the number of memory readings, and entropy decoding is performed on multiple codewords to be decoded through multi-bypass decoding, reducing the amount of calculation and time consumption of entropy decoding processing, and effectively improving the video decoding speed without the need to design a separate hardware circuit and without opening multiple decoding threads. It also significantly reduces the time consumption of mobile terminals decoding HEVC videos, solves the decoding speed bottleneck problem caused by CABAC entropy decoding, and adjusts the entropy decoding engine architecture to make the architecture compatible with the mobile terminal, reduces the number of normalization calculations, and improves the decoding speed from the perspective of memory, cache reading and branch prediction. At the same time, multiple entropy decoding results are parsed at once through the decoding method of multi-bypass decoding, which reduces the absolute amount of calculation for entropy decoding of multiple bits to be decoded and reduces the decoding time. It also reduces the dependence on special hardware circuit units, can be run on the terminal processor, is easy to deploy, and does not need to start multiple decoding threads, in exchange for decoding speed at the cost of increased power consumption, is more practical, and video playback is smoother, and the battery of the video decoding device can be extended to support playback time, providing a smoother and more lasting viewing experience.
[0075] Figure 5 is a schematic diagram of the structure of a video decoding device provided by an embodiment of the present application. Figure 5 The video decoding device includes a codeword extraction module 51, an entropy decoding module 52 and a reconstruction processing module 53.
[0076] Among them, the codeword extraction module 51 is configured to obtain the codeword to be decoded from the code stream of the video frame to be decoded according to the set codeword length, and the set codeword length is set according to the number of bits of the operating system; the entropy decoding module 52 is configured to add the codeword to be decoded to the entropy decoding engine, and the entropy decoding engine performs entropy decoding on the codeword to be decoded to obtain an entropy decoding result, and the entropy decoding decoding method includes conventional entropy decoding and multi-bypass entropy decoding, and the conventional entropy decoding and multi-bypass entropy decoding are configured based on different coding syntaxes respectively; the reconstruction processing module 53 is configured to reconstruct the entropy decoding result to obtain a reconstructed frame.
[0077] In the above, the codeword to be decoded is obtained from the code stream of the video frame to be decoded according to the set codeword length determined according to the number of bits of the operating system, and the codeword to be decoded is submitted to the entropy decoding engine for entropy decoding to obtain the entropy decoding result, and the entropy decoding result is reconstructed to obtain the reconstructed frame. The length of the read codeword to be decoded is aligned with the number of bits of the operating system. Each subsequent time the codeword to be decoded is read, the memory addressing is aligned to the number of bits of the operating system, which effectively reduces the single read time and the number of memory reads, and entropy decoding is performed on multiple codewords to be decoded through multi-bypass decoding, which reduces the computational complexity and time consumption of the entropy decoding process, and effectively improves the video decoding speed without the need to design a separate hardware circuit and without the need to start multiple decoding threads.
[0078] In a possible embodiment, when the entropy decoding engine performs entropy decoding on the codeword to be decoded to obtain the entropy decoding result, the configuration is as follows:
[0079] Obtaining bits to be decoded from the codeword to be decoded in sequence, and determining a decoding method according to the coding syntax to which the bits to be decoded belong;
[0080] The bits to be decoded are decoded based on the determined decoding method to obtain an entropy decoding result.
[0081] In a possible embodiment, when the entropy decoding engine decodes the to-be-decoded bits based on the determined decoding mode to obtain the entropy decoding result, the configuration is as follows:
[0082] Based on the decoding method of the to-be-decoded bits being conventional entropy decoding, the to-be-decoded bits are quantized in coding intervals, corresponding probability symbol intervals are determined according to the quantized coding intervals, and entropy decoding results of the to-be-decoded bits are determined according to a comparison result of the probability symbol intervals and the interval offset values;
[0083] The decoding method based on the to-be-decoded bits is multi-pass entropy decoding, and the to-be-decoded bits are subjected to multi-pass entropy decoding according to the number of entropy decoding results that need to be parsed to obtain entropy decoding results.
[0084] In a possible embodiment, the probability symbol interval includes a high probability symbol interval and a low probability symbol interval, and the entropy decoding engine determines the entropy decoding result of the to-be-decoded bit according to the comparison result of the probability symbol interval and the interval offset value, and is configured as follows:
[0085] In response to a comparison result that the interval offset value is greater than or equal to the high probability symbol interval, the entropy decoding result of the to-be-decoded bit is set to a low probability symbol value, and the interval offset value is updated by a difference between the interval offset value and the high probability symbol interval, and the coding interval is updated by the low probability symbol interval;
[0086] In response to a comparison result that the interval offset value is less than the high probability symbol interval, the entropy decoding result of the to-be-decoded bit is set to the high probability symbol value, and the coding interval is updated by the high probability symbol interval.
[0087] In a possible embodiment, when the entropy decoding engine performs multi-pass entropy decoding on the bits to be decoded according to the number of entropy decoding results that need to be parsed to obtain the entropy decoding results, the configuration is as follows:
[0088] In response to the number of entropy decoding results to be parsed being a first preset value, performing a shift operation on the interval offset value, assigning the interval offset value after the shift operation and the result of an OR operation of the bit to be decoded to the interval offset value, and determining the entropy decoding result of the bit to be decoded according to a comparison operation result of the interval offset value obtained by the assignment and the encoding interval;
[0089] In response to the number of entropy decoding results that need to be parsed being greater than a first preset value, a shift operation corresponding to the number of entropy decoding results is performed on the interval offset value, the interval offset value after the shift operation and the result of an OR operation of the bits to be decoded corresponding to the number of entropy decoding results are assigned to the interval offset value, and the entropy decoding result of the bits to be decoded corresponding to the number of entropy decoding results is determined based on the result of a division operation of the assigned interval offset value and the encoding interval.
[0090] In a possible embodiment, when the entropy decoding engine determines the entropy decoding result of the to-be-decoded bit according to the comparison result of the interval offset value obtained by the assignment and the encoding interval, the configuration is as follows:
[0091] In response to the interval offset value obtained by the assignment being greater than the comparison operation result of the coding interval, the entropy decoding result of the to-be-decoded bit is set to a second preset value, and the interval offset value is updated by the difference between the interval offset value and the high-probability symbol interval;
[0092] In response to the comparison operation result that the interval offset value obtained by assigning is less than or equal to the coding interval, the entropy decoding result of the to-be-decoded bit is set to a third preset value.
[0093] In a possible embodiment, the entropy decoding engine is configured to decode the to-be-decoded bits based on a determined decoding method to obtain an entropy decoding result, and then, in response to the coding interval being less than a set accuracy threshold, perform a normalization operation on the interval offset value and the coding interval.
[0094] In a possible embodiment, the video decoding device further includes an engine initialization module, the engine initialization module being configured to initialize the interval offset value and the encoding interval of the entropy decoding engine according to the set codeword length.
[0095] In a possible embodiment, the entropy decoding engine is configured to convert the storage mode of the codeword to be decoded from the big endian order to the little endian order after obtaining the codeword to be decoded from the code stream of the video frame to be decoded according to the set codeword length.
[0096] It is worth noting that in the embodiment of the above-mentioned video decoding device, the various units and modules included are only divided according to functional logic, but are not limited to the above-mentioned division, as long as the corresponding functions can be realized; in addition, the specific names of the functional units are only for the convenience of distinguishing each other, and are not used to limit the protection scope of the embodiments of the present invention.
[0097] The embodiment of the present application also provides a video decoding device, which can integrate the video decoding device provided by the embodiment of the present application. Figure 6 is a structural diagram of a video decoding device provided in an embodiment of the present application. Figure 6 The video decoding device includes: an input device 63, an output device 64, a memory 62 and one or more processors 61; the memory 62 is used to store one or more programs; when the one or more programs are executed by the one or more processors 61, the one or more processors 61 implement the video decoding method provided in the above embodiment. The video decoding device, equipment and computer provided above can be used to execute the video decoding method provided in any of the above embodiments, and have corresponding functions and beneficial effects.
[0098] The embodiment of the present application also provides a storage medium storing computer executable instructions, which are used to execute the video decoding method provided in the above embodiment when executed by a computer processor. Of course, the storage medium storing computer executable instructions provided in the embodiment of the present application, whose computer executable instructions are not limited to the video decoding method provided above, can also execute the related operations in the video decoding method provided in any embodiment of the present application. The video decoding device, equipment and storage medium provided in the above embodiment can execute the video decoding method provided in any embodiment of the present application. For technical details not described in detail in the above embodiment, please refer to the video decoding method provided in any embodiment of the present application.
[0099] In some possible implementations, various aspects of the method provided by the present disclosure may also be implemented in the form of a program product, which includes a program code. When the program product is run on a computer device, the program code is used to enable the computer device to perform the steps of the method according to various exemplary embodiments of the present disclosure described above in this specification. For example, the computer device may perform the video decoding method recorded in the embodiment of the present disclosure. The program product may adopt any combination of one or more readable media.
Claims
1. A video decoding method, characterized in that: include: Obtaining a codeword to be decoded from a code stream of a video frame to be decoded according to a set codeword length, wherein the set codeword length is set according to the number of bits of an operating system; The codeword to be decoded is added to an entropy decoding engine, and the entropy decoding engine performs entropy decoding on the codeword to be decoded to obtain an entropy decoding result, wherein the decoding mode of the entropy decoding includes conventional entropy decoding and multi-bypass entropy decoding, and the conventional entropy decoding and the multi-bypass entropy decoding are configured based on different coding syntaxes respectively; wherein, when the entropy decoding engine performs entropy decoding on the codeword to be decoded to obtain the entropy decoding result, the method includes: sequentially obtaining bits to be decoded from the codeword to be decoded, and determining a decoding mode according to the coding syntax to which the bits to be decoded belong; based on the decoding mode of the bits to be decoded being multi-bypass entropy decoding, and the number of entropy decoding results to be parsed being a first preset value, performing a shift operation on the interval offset value, and shifting the interval offset value after the shift operation; The method further comprises: assigning an OR operation result of an interval offset value and the bits to be decoded to the interval offset value, and determining the entropy decoding result of the bits to be decoded according to the comparison operation result of the interval offset value obtained by the assignment and the coding interval; based on the fact that the decoding mode of the bits to be decoded is multi-bypass entropy decoding, and the number of entropy decoding results to be analyzed is greater than the first preset value, performing a shift operation corresponding to the number of entropy decoding results on the interval offset value, assigning the interval offset value after the shift operation and the OR operation result of the bits to be decoded corresponding to the number of entropy decoding results to the interval offset value, and determining the entropy decoding result of the bits to be decoded corresponding to the number of entropy decoding results according to the division operation result of the interval offset value obtained by the assignment and the coding interval; The entropy decoding result is reconstructed to obtain a reconstructed frame.
2. The video decoding method according to claim 1, characterized in that: When the entropy decoding engine performs entropy decoding on the codeword to be decoded to obtain an entropy decoding result, it also includes: Based on the fact that the decoding method of the bits to be decoded is conventional entropy decoding, the coding interval of the bits to be decoded is quantized, the corresponding probability symbol interval is determined according to the quantized coding interval, and the entropy decoding result of the bits to be decoded is determined according to the comparison result of the probability symbol interval and the interval offset value.
3. The video decoding method according to claim 2, characterized in that: The probability symbol interval includes a high probability symbol interval and a low probability symbol interval, and determining the entropy decoding result of the to-be-decoded bit according to the comparison result of the probability symbol interval and the interval offset value includes: In response to a comparison result that the interval offset value is greater than or equal to the high probability symbol interval, setting the entropy decoding result of the to-be-decoded bit to a low probability symbol value, and updating the interval offset value by a difference between the interval offset value and the high probability symbol interval, and updating the coding interval by the low probability symbol interval; In response to a comparison result that the interval offset value is less than the high probability symbol interval, the entropy decoding result of the to-be-decoded bit is set to the high probability symbol value, and the coding interval is updated by the high probability symbol interval.
4. The video decoding method according to claim 1, characterized in that: The step of determining the entropy decoding result of the to-be-decoded bit by comparing the interval offset value obtained according to the assignment with the encoding interval comprises: In response to the comparison operation result that the interval offset value obtained by assigning a value is greater than the coding interval, setting the entropy decoding result of the to-be-decoded bit to a second preset value, and updating the interval offset value by the difference between the interval offset value and the high-probability symbol interval; In response to a comparison result that the interval offset value obtained by assigning a value is less than or equal to the coding interval, the entropy decoding result of the to-be-decoded bit is set to a third preset value.
5. The video decoding method according to claim 1, characterized in that: After decoding the to-be-decoded bits based on the determined decoding mode to obtain an entropy decoding result, the method further includes: In response to the encoding interval being smaller than a set precision threshold, a normalization operation is performed on the interval offset value and the encoding interval.
6. The video decoding method according to claim 1, characterized in that: The video decoding method further comprises: Initialize the interval offset value and encoding interval of the entropy decoding engine according to the set codeword length.
7. The video decoding method according to any one of claims 1 to 6, characterized in that: After obtaining the codeword to be decoded from the code stream of the video frame to be decoded according to the set codeword length, the method further includes: The storage mode of the codeword to be decoded is converted from big endian to little endian.
8. A video decoding device, characterized in that: It includes a codeword extraction module, an entropy decoding module and a reconstruction processing module, wherein: The codeword extraction module is configured to obtain the codeword to be decoded from the code stream of the video frame to be decoded according to a set codeword length, and the set codeword length is set according to the number of bits of the operating system; The entropy decoding module is configured to add the codeword to be decoded to an entropy decoding engine, and the entropy decoding engine performs entropy decoding on the codeword to be decoded to obtain an entropy decoding result, wherein the decoding mode of the entropy decoding includes conventional entropy decoding and multi-bypass entropy decoding, and the conventional entropy decoding and the multi-bypass entropy decoding are configured based on different coding syntaxes respectively; wherein, when the entropy decoding engine performs entropy decoding on the codeword to be decoded to obtain the entropy decoding result, the method includes: sequentially obtaining bits to be decoded from the codeword to be decoded, and determining a decoding mode according to the coding syntax to which the bits to be decoded belong; based on the decoding mode of the bits to be decoded being multi-bypass entropy decoding, and the number of entropy decoding results to be parsed being a first preset value, performing a shift operation on the interval offset value, and performing the shift operation on the interval offset value; The OR operation result of the interval offset value after the operation and the to-be-decoded bit is assigned to the interval offset value, and the entropy decoding result of the to-be-decoded bit is determined according to the comparison operation result of the interval offset value obtained by the assignment and the coding interval; based on the fact that the decoding mode of the to-be-decoded bit is multi-bypass entropy decoding, and the number of entropy decoding results to be analyzed is greater than the first preset value, a shift operation corresponding to the number of entropy decoding results is performed on the interval offset value, the OR operation result of the interval offset value after the shift operation and the to-be-decoded bit corresponding to the number of entropy decoding results is assigned to the interval offset value, and the entropy decoding result of the to-be-decoded bit corresponding to the number of entropy decoding results is determined according to the division operation result of the interval offset value obtained by the assignment and the coding interval; The reconstruction processing module is configured to perform reconstruction processing on the entropy decoding result to obtain a reconstructed frame.
9. A video decoding device, characterized in that: include: memory and one or more processors; The memory is used to store one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the video decoding method as described in any one of claims 1-7.
10. A storage medium storing computer executable instructions, characterized in that: When the computer executable instructions are executed by a computer processor, they are used to perform the video decoding method according to any one of claims 1 to 7.
11. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the video decoding method according to any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
An entropy decoding bit parsing method, an entropy decoder, and a video decoding chip
CN101505424A
Arithmetic unit used for context arithmetic encoding and decoding
CN102231830A
Method and apparatus for entropy encoding / decoding
CN103797803A
Entropy decoding hardware parallel computing method suitable for AVC and application
CN112422987A
Entropy encoder, video encoder including the same and electronic system including the same
US20180213231A1
