WO2023246514A1 - 一种视频解码方法、装置、设备及存储介质 - Google Patents

一种视频解码方法、装置、设备及存储介质 Download PDF

Info

Publication number
WO2023246514A1
WO2023246514A1 PCT/CN2023/098928 CN2023098928W WO2023246514A1 WO 2023246514 A1 WO2023246514 A1 WO 2023246514A1 CN 2023098928 W CN2023098928 W CN 2023098928W WO 2023246514 A1 WO2023246514 A1 WO 2023246514A1
Authority
WO
WIPO (PCT)
Prior art keywords
entropy decoding
decoded
interval
bits
result
Prior art date
Application number
PCT/CN2023/098928
Other languages
English (en)
French (fr)
Inventor
张凯明
Original Assignee
广州市百果园信息技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 广州市百果园信息技术有限公司 filed Critical 广州市百果园信息技术有限公司
Publication of WO2023246514A1 publication Critical patent/WO2023246514A1/zh

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/44Decoders specially adapted therefor, e.g. video decoders which are asymmetric with respect to the encoder
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/184Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being bits, e.g. of the compressed video stream
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/42Methods or arrangements for coding, decoding, compressing or decompressing digital video signals characterised by implementation details or hardware specially adapted for video compression or decompression, e.g. dedicated software implementation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/90Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using coding techniques not provided for in groups H04N19/10-H04N19/85, e.g. fractals
    • H04N19/91Entropy coding, e.g. variable length coding [VLC] or arithmetic coding

Definitions

  • the embodiments of the present application relate to the field of video decoding technology, and in particular, to a video decoding method, device, equipment and storage medium.
  • Video decoding technology refers to the process of using a hardware decoder or software decoder to perform binary analysis and pixel reconstruction on the binary code stream downloaded from the network according to a specific syntax, and then piece it together into a whole frame for the upper-layer application to implement video playback. .
  • Video decoding mainly includes two major modules: entropy decoding and reconstruction.
  • the reconstruction module is mostly regular numerical calculation and processing, and the degree of optimization is relatively deep.
  • the entropy decoding module it is adopted in the HEVC (International Standard for High Efficiency Video Coding) standard.
  • HEVC International Standard for High Efficiency Video Coding
  • CABAC Context Model-Based Binary Arithmetic Coding
  • the parsing of the video code stream is a typical serial mode, making it difficult to achieve parallel acceleration and becoming a speed bottleneck for decoder deployment, especially on mobile terminals with limited computing power.
  • the problem of slow decoding speed caused by the entropy decoding module is particularly prominent.
  • the efficiency of video decoding is generally improved through hardware circuit unit design or software multi-thread parallelism.
  • the hardware circuit unit design method needs to rely on a specialized circuit structure, and there are large differences in the implementation solutions of different terminals.
  • the software multi-thread parallelism will lead to an increase in terminal power consumption, which can easily cause the terminal to consume power too quickly and generate significant heat.
  • Software multi-thread parallelism is also prone to be greatly restricted in the field of mobile terminals.
  • Embodiments of the present application provide a video decoding method, device, equipment and storage medium to solve the technical problem in related technologies that video decoding acceleration solutions are less effective in mobile terminals without the need for separate devices. It effectively improves the video decoding speed by designing hardware circuits and eliminating the need to open multiple decoding threads.
  • embodiments of the present application provide a video decoding method, including:
  • the codewords to be decoded are added to the entropy decoding engine, and the codewords to be decoded are entropy decoded by the entropy decoding engine to obtain an entropy decoding result.
  • the decoding methods of the entropy decoding include conventional entropy decoding and multi-bypass. Entropy decoding, the conventional entropy decoding and the multi-bypass entropy decoding are respectively configured based on different encoding syntaxes;
  • embodiments of the present application provide a video decoding device, including 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 video frame code stream to be decoded according to the set codeword length, and the set codeword length is set according to the number of operating system bits;
  • 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.
  • the decoding method of the entropy decoding Including conventional entropy decoding and multi-bypass entropy decoding, the conventional entropy decoding and the multi-bypass entropy decoding are respectively configured based on different encoding syntaxes;
  • the reconstruction processing module is configured to perform reconstruction processing on the entropy decoding result to obtain a reconstructed frame.
  • embodiments of the present application provide a video decoding device, including: a memory and one or more processors;
  • the memory is configured to store one or more programs
  • the one or more processors When the one or more programs are executed by the one or more processors, the one or more processors are caused to implement the video decoding method as described in the first aspect.
  • embodiments of the present application provide a storage medium that stores computer-executable instructions that, when executed by a computer processor, are configured to perform the video decoding method as described in the first aspect.
  • inventions of the present application provide a computer program product.
  • the computer program product includes a computer program.
  • the computer program is stored in a computer-readable storage medium.
  • At least one processor of the device reads the computer program from the computer-readable storage medium.
  • the computer program is obtained and executed, causing the device to perform the video decoding method as described in the first aspect.
  • the codeword length to be decoded is determined according to the set codeword length determined according to the number of bits of the operating system.
  • the codeword to be decoded is obtained from the frequency frame code stream, 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, and the read codeword to be decoded is The length is aligned with the number of bits of the operating system.
  • the memory addressing is aligned with the number of bits of the operating system, effectively reducing the single read time and the number of memory reads, and through multi-bypass decoding.
  • Entropy decoding is performed on multiple code words to be decoded, which reduces the calculation amount and time-consuming of entropy decoding. It effectively improves the video decoding speed without the need to design separate hardware circuits and open multiple decoding threads.
  • Figure 1 is a flow chart of a video decoding method provided by an embodiment of the present application.
  • Figure 2 is a schematic flowchart of entropy decoding of codewords to be decoded provided by an embodiment of the present application
  • Figure 3 is a schematic diagram of a conventional decoding process in related technologies
  • Figure 4 is a schematic diagram of a conventional decoding process provided by an embodiment of the present application.
  • Figure 5 is a schematic structural diagram of a video decoding device provided by an embodiment of the present application.
  • Figure 6 is a schematic structural diagram of a video decoding device provided by an embodiment of the present application.
  • Figure 1 shows a flow chart of a video decoding method provided by an embodiment of the present application.
  • the video decoding method provided by an embodiment of the present application can be executed by a video decoding device, and the video decoding device can be implemented by hardware and/or software. Implemented and integrated into video decoding devices (such as mobile phones and tablets).
  • the video decoding method includes:
  • S110 Obtain the codeword to be decoded from the video frame code stream to be decoded according to the set codeword length, and the set codeword length is set according to the number of operating system bits.
  • the video frame code stream to be decoded provided by this solution is obtained by unpacking and framing the binary code stream, so that, for example, a video-related application in a video decoding device receives the binary code stream sent by the Internet server (for example, in a video decoding device
  • the application layer in the video decoding device sends a video acquisition request to the server and pulls a specific binary code stream, and transfers the obtained binary code
  • the binary code stream is unpacked and framed, and the binary code stream that is split and encapsulated in different transmission packets is removed from the encapsulation information and combined into a complete video frame code stream to be decoded, waiting Perform decoding processing (including CABAC entropy decoding and reconstruction processing based on the HEVC standard).
  • the code words to be decoded are extracted from the code stream of the video frame to be decoded according to the set code word length.
  • the set codeword length provided by this solution is set according to the number of operating system bits. 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-bit or 32-bit. , that is, using a 64-bit or 32-bit address 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.
  • this solution 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 big endian to little endian.
  • the video decoding equipment provided by this solution is built on x86 or arm architecture. Since the storage method of the HEVC encoding stream is big endian, both x86 and arm architectures are By default, little-endian order is used. The extracted 64-bit or 32-bit codewords to be decoded need to be converted from big-endian order to little-endian order to ensure correct parsing of the code stream.
  • S120 Add the codeword to be decoded to the entropy decoding engine, and the entropy decoding engine performs the decoding on the codeword to be decoded. Row entropy decoding obtains entropy decoding results.
  • the decoding methods of entropy decoding include conventional entropy decoding and multi-bypass entropy decoding. Conventional entropy decoding and multi-bypass entropy decoding are configured based on different encoding syntaxes.
  • the codeword to be decoded is extracted from the video frame code stream 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 the entropy decoding result.
  • the entropy decoding engine uses entropy decoding methods to decode codewords to be decoded, including conventional entropy decoding (Normal bin entropy decoding) and multi-bypass entropy decoding (Bypass multi-bins decoding), and conventional entropy decoding and multi-bypass entropy decoding They are configured based on different encoding syntaxes.
  • Conventional entropy decoding can parse one entropy decoding result at a time
  • multi-bypass decoding can parse one or more entropy decoding results at a time.
  • the order of different encoding syntaxes in the binary code stream and the encoding and decoding types can be specified by the international video encoding standard HEVC/H265.
  • the entropy decoding engine can be designed according to the decoding order specified by the international video encoding standard, and call different encodings at different decoding stages.
  • the decoding method performs entropy decoding. 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 sign of the quantization coefficient.
  • the order in which the entropy decoding engine calls the decoding method is conventional entropy decoding, conventional entropy decoding. , conventional entropy decoding and multi-bypass entropy decoding.
  • S121 Obtain the bits to be decoded from the code words to be decoded in turn, and determine the decoding method according to the coding syntax to which the bits to be decoded belong.
  • S122 Decode the bits to be decoded based on the determined decoding method to obtain the entropy decoding result.
  • the codeword to be decoded includes one or more bits to be decoded generated based on different encoding syntaxes.
  • the entropy decoding engine sequentially obtains the codeword to be decoded from the codeword to be decoded. bits, and determine the coding syntax to which these bits to be decoded belong, and determine the decoding methods corresponding to these coding syntaxes.
  • the bits to be decoded are decoded based on the corresponding decoding mode to obtain an entropy decoding result.
  • the entropy decoding result corresponding to the codeword to be decoded can be obtained based on the entropy decoding results of multiple bits to be decoded.
  • the next codeword 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 result obtained by the entropy decoding can be processed as follows. One-step reconstruction process.
  • the video decoding method provided by this solution performs a decoding process each time When decoding coded picture frames (each picture frame includes multiple codewords to be decoded), first initialize the entropy decoding engine, for example, initialize the interval offset value and encoding interval of the entropy decoding engine according to the set codeword length to complete Initialization of the entropy decoding engine.
  • the entropy decoding engine mainly performs entropy decoding based on the two elements of encoding interval (range) and interval offset value (offset).
  • the set accuracy threshold is set to 256. If the updated coding interval is less than 256, the coding interval needs to be normalized to expand the coding. interval to ensure the analytical accuracy of the next entropy decoding result.
  • the normalization operation of the encoding interval is similar to re-initializing the encoding interval, that is, re-expanding the encoding interval to a precision aligned with the number of operating system bits (for example, re-expanding the encoding interval to 9 bits), and updating the interval offset value and cache Codewords include a large number of shift operations and code stream reading processes.
  • This solution significantly increases the number of recursive divisions of the coding interval and reduces the probability that the coding interval is less than 256 by increasing the initial number of digits in the coding interval and interval offset value. Reduce the number of normalization times and reduce the time-consuming entropy decoding process. Based on this, this solution has been targeted and optimized based on the HEVC standard.
  • the HEVC standard uses 510, which is a length of 9 bits, as the coding interval.
  • the interval offset value is initialized to the value represented by the first 9 bits of the codeword.
  • the solution uses an offset method to extend the coding interval from 9 bit to 64 bit length. , that is, the initial value of the coding interval changes to 510 ⁇ 55, and at the same time, the initial offset value of the interval offset value is correspondingly changed to the value represented by the first 64 bits of the codeword, which increases the number of recursive divisions of the interval supported, thereby effectively reducing normalization number of times.
  • the cache unit of the codeword to be decoded needs to be changed to 64bit, that is, 64-bit codewords to be decoded are taken out from the binary code stream each time for later use.
  • the entropy decoding engine determines the decoding method of the bits to be decoded based on the coding syntax to which the bits to be decoded belong. Based on this, the entropy decoding engine provided by this solution decodes the bits to be decoded based on the determined decoding method to obtain entropy decoding. Results include:
  • the decoding method based on 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 based on the quantized coding interval, and the to-be-decoded bits are determined based on the comparison result of the probability symbol interval and the interval offset value.
  • Entropy decoding result of decoded bits is obtained by entropy decoding.
  • the decoding method based on the bits to be decoded is multi-bypass entropy decoding, and the entropy solution is analyzed as needed.
  • the number of code results is to perform multi-side entropy decoding on the bits to be decoded to obtain the entropy decoding result.
  • the coding interval of the bits to be decoded is quantized, and the probability symbol interval (probability symbol interval) corresponding to the quantized coding interval is determined according to the preset probability state transition table. Including high probability symbol interval or small probability symbol interval). Compare the corresponding probability symbol interval and the interval offset value, and determine the entropy decoding result of the current bit to be decoded based on the comparison result between the probability symbol interval and the interval offset value, that is, determine the entropy decoding result based on the comparison result between the probability symbol interval and the interval offset value.
  • the interval offset value falls into a high probability symbol interval or a low probability symbol interval
  • the coding interval and the interval offset value can be updated according to the probability symbol interval corresponding to the quantized coding interval.
  • the offset value falls into a high-probability symbol interval
  • the high-probability symbol interval is used to update the coding interval.
  • the offset value falls into a small-probability symbol interval
  • the small-probability symbol interval is used to update the coding interval
  • the high-probability symbol interval is used to update the interval offset. Shift value.
  • the small probability symbol interval can be obtained by searching the probability state transition table based on the current probability state index state (the high probability symbol interval can be determined based on the difference between the coding interval and the small probability symbol interval), And compare the interval offset value with the high probability symbol interval.
  • the small 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 use the small probability symbol interval as the updated interval offset value; when the interval offset value is smaller than the high probability symbol interval, use the high probability symbol value as the decoding value corresponding to the entropy decoding result, and use the high probability symbol interval as the updated The interval offset value after.
  • the entropy decoding engine determines the entropy decoding result of the bits to be decoded based on the comparison result of the probability symbol interval and the interval offset value, it includes:
  • the high probability symbol interval in the probability symbol interval is compared with the interval offset value.
  • the entropy decoding engine provided by this solution decodes the bits to be decoded based on the determined decoding method to obtain the entropy decoding result, it also includes: in response to the encoding interval being smaller than the set accuracy threshold, adjusting the interval offset value Perform normalization operation on the coding interval.
  • the updated coding interval is compared with the set accuracy threshold (for example, 256).
  • the set accuracy threshold for example, 256.
  • the coding interval is less than the set accuracy threshold, it means The current encoding interval is too small and cannot meet the analytical accuracy of the next entropy decoding result. It is necessary to normalize the interval offset value and encoding interval, that is, re-extend the interval offset value and encoding interval to 64 bits, and at the same time change from binary code to Read the new 64-bit codeword to be decoded from the stream to ensure the parsing accuracy of the entropy decoding result.
  • the international video coding standard HEVC stipulates that the initial encoding interval is 510, which is represented by 9 bits, and the interval from 0 to 512 is represented by 9 bits. Range, the interval offset value is assigned based on the first 9 bits of the codeword.
  • Subtracting from the interval range can obtain the high probability Symbol interval (rmps), based on the comparison result of the interval offset value offset and the high probability symbol interval rps, it is judged that the result falls into the approximate probability symbol interval or low probability symbol interval, and then adopt different interval range update strategies to set the high probability symbol interval or 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 will be used as the new interval range) Create a new interval range, if the small probability symbol interval value is hit, the small probability symbol interval value will be regarded as the new interval range); when the interval range is less than 256, it means that the accuracy of the interval range needs to be improved, and a normalization operation will be performed (re -normalization), output the parsed entropy decoding result bin, and renormalize the interval range to 510
  • FIG 4 is a schematic diagram of a conventional decoding process provided by an embodiment of the present application.
  • this scheme expands the coding interval, interval offset value and probability symbol interval to the same number of digits as the number of operating system digits (such as 64 bits), 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 based on the first 64 bits of the codeword to be decoded.
  • This solution extends the coding interval from the original 9bit to 64bit, and starts the recursive division with the initial value 510 ⁇ 55. During the division process, the coding interval continues to become smaller and useless prefix 0 appears.
  • the coding interval includes prefix 0 and 9bit are valid. bit and suffix 0.
  • the probability state transition table is obtained rlps is still a 9-bit range value and needs to be aligned to a valid 9-bit position in the 64-bit coding interval.
  • the same suffix 0 can be added to the small probability symbol interval rps, that is, rlps ⁇ (55-clz).
  • the calculation formula for the high probability symbol interval rps remains unchanged and is still range-rlps. Compare the interval offset value offset with the high probability symbol interval rmps.
  • offset ⁇ rmps it means that the offset offset will fall into the small probability symbol interval rps.
  • the encoding interval is less than 256, it is considered that the current encoding interval is too small and cannot meet the parsing accuracy of the next entropy decoding result, and a normalization operation needs to be performed ( re-normalization), re-expand the encoding interval and interval offset value to 64 bit, and read the new 64-bit codeword to be decoded from the binary code stream.
  • the cache cache of the mobile device processor is generally 64 bits. Therefore, this solution can facilitate memory reading and writing by aligning the operating system bits. data processing.
  • the coding interval is divided recursively with a length of 64 bits. Compared with the recursive division of the coding interval using 9 bits in related technologies, this solution 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 calculation amount, and enter the normalization process. The possibility of unified branches is reduced, branch prediction is more accurate, and time-consuming caused by branch prediction errors is reduced.
  • the entropy decoding result obtained by the previous decoding will be used (before starting multi-bypass entropy decoding, the multi-bypass decoding will be judged based on the already solved entropy decoding result). How many bits to be decoded should be parsed for decoding (the decoding result of the bits to be decoded is the entropy decoding result). Determine the number of entropy decoding results that currently need to be parsed, and perform multi-bypass entropy decoding on the bits to be decoded according to the number of entropy decoding results that need to be parsed. Entropy decoding result.
  • the calculation and assignment processes required for entropy decoding of a single bit to be decoded can be combined according to the number of entropy decoding results that need to be parsed, and calculation processes such as repeated calculations and assignments can be directly used
  • a single instruction is completed at once, replacing the original repeated calculation and assignment process of entropy decoding of multiple bits to be decoded.
  • the entropy decoding engine when the entropy decoding engine provided by this solution performs multi-bypass 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, it includes:
  • S12221 In response to the number of entropy decoding results that need to be parsed being the first preset value, perform a shift operation on the interval offset value, and assign the OR operation result of the interval offset value after the shift operation and the bits to be decoded to the interval offset value. Shift the value, and determine the entropy decoding result of the bits to be decoded based on the comparison operation result between the assigned interval offset value and the encoding interval.
  • the interval offset value after the shift operation is ORed with the bits to be decoded, and the OR operation result of the interval offset value and the bits to be decoded is assigned to the interval offset value (i.e. offset
  • read_bits).
  • the interval offset value i.e. offset
  • read_bits.
  • the entropy decoding engine when the entropy decoding engine provided by this solution determines the entropy decoding result of the bits to be decoded based on the comparison operation result between the assigned interval offset value and the coding interval, the entropy decoding engine includes: responding to the assigned interval offset value.
  • the entropy decoding result of the bit to be decoded is set to the second preset value, and the interval offset value is updated through the difference between the interval offset value and the high probability symbol interval; in response to the assignment, it is obtained
  • the interval offset value is less than or equal to the comparison operation result of the encoding interval, and the entropy decoding result of the bit to be decoded is set to the third preset value.
  • the entropy decoding result of the bits to be decoded is set to the second preset value (for example, the entropy decoding result of the bits to be decoded is set to 1), and the entropy decoding result of the bits to be decoded is set to 1, and the entropy decoding result of the bits to be decoded is set to 1.
  • the entropy decoding result of the bits to be decoded is set to the third preset value (for example, the entropy decoding result of the bits to be decoded is set to 0).
  • the symbol probability corresponding to the probability symbol interval is always equal to 0.5
  • the high probability symbol interval and the small probability symbol interval are equal
  • the size of the coding interval is fixed, and there is no need to update the coding interval.
  • a shift operation corresponding to the number of entropy decoding results is performed on the interval offset value (shift the interval offset value to the left with the number of entropy decoding results that need to be parsed).
  • the process of comparing the interval offset value and the encoding interval to obtain the entropy decoding result is similar to division.
  • multi-bypass decoding has two situations: parsing one entropy decoding result and parsing multiple consecutive entropy decoding results.
  • the entropy decoding process for parsing an entropy decoding result includes a left shift of the interval offset value, an OR operation of the interval offset value and a single to-be-decoded bit in the codeword to be decoded, and a region Processes such as offset values, comparison operations between coding intervals, and assignment of entropy decoding results.
  • the process of parsing multiple consecutive entropy decoding results is similar to the process of parsing one entropy decoding result, and belongs to the repetitive cycle of the above process.
  • This scheme uses one shift, one OR operation, one division and one multiplication when performing multi-bypass decoding on multiple bits to be decoded, replacing the original multiple shifts, multiple OR operations, multiple comparisons and The assignment process can significantly reduce decoding time and improve decoding speed.
  • the entropy decoding result can be reconstructed to obtain a reconstructed frame.
  • entropy decoding is based on binary parsing rules, parsing the binary code stream (codeword to be decoded) into numerical values of various types and lengths.
  • the entropy decoding engine converts these parsed numerical values in accordance with the syntax order specified by the international video coding standard HEVC. It is given practical meaning, such as the width and height dimensions of the video, quantization step size, reference frame number, residual coefficient and other information. This information can be used as data to complete the next step of video reconstruction.
  • the reconstruction processing of the entropy decoding results includes processes such as inverse transformation, inverse quantization, predictive decoding, and post-processing filtering, which are responsible for completing the reconstruction of the pixel value of a frame.
  • the inverse transformation is responsible for converting the parsed transformation coefficients (the entropy decoding engine will parse out a large amount of syntax information based on the code words to be decoded. The highest proportion of this syntax information is the transformation coefficients, which are all the components of each video frame.
  • the mapping of pixel residual values in the transform domain is mapped from the transform domain to the pixel domain to obtain the pixel residual coefficients.
  • 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.
  • Predictive decoding is responsible for passing Intra-frame/inter-frame prediction obtains the prediction block, which is superimposed with the pixel residual coefficient to complete the preliminary reconstruction.
  • the post-processing filter uses deblocking filtering and sample adaptive compensation according to the filter parameters to remove the blocking effect and ringing effect of the reconstructed frame. , complete the reconstruction of one frame to obtain the reconstructed frame.
  • a successfully decoded signal and the memory address of the reconstructed frame can be sent to the application layer, and the application layer will use the reconstructed frame based on the reconstructed frame.
  • the application layer copies the decoded video frame from the memory address provided by the decoder, and then goes through a series of images such as rendering, scaling, and beautification. It can be displayed after processing.
  • the codeword to be decoded is obtained from the video frame code stream to be decoded according to the set codeword length determined according to the number of operating system bits, 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 a reconstructed frame.
  • the length of the read codeword to be decoded is aligned with the number of operating system bits.
  • the memory addressing is aligned to the number of operating system bits, effectively reducing Single read time and the number of memory reads, and entropy decoding of multiple to-be-decoded codewords is performed through multi-bypass decoding, reducing the calculation amount and time-consuming of entropy decoding, without the need to design separate hardware circuits, and without
  • the video decoding speed is effectively improved. It also significantly reduces the time it takes for mobile terminals to decode HEVC videos, solves the decoding speed bottleneck problem caused by CABAC entropy decoding, and adjusts the entropy decoding engine architecture to adapt the architecture to mobile terminals, reducing the number of normalized calculations.
  • multiple entropy decoding results are parsed at one time through the decoding method of multi-bypass decoding, which reduces the absolute calculation amount of entropy decoding of multiple bits to be decoded and reduces the decoding time. It also reduces dependence on special hardware circuit units. It can be run on the terminal processor and is easy to deploy. At the same time, there is no need to open multiple decoding threads.
  • the decoding speed is increased at the expense of increased power consumption. It is more practical and smoother in video playback. , and extend the battery life of the video decoding device to support playback time, providing a smoother and longer-lasting viewing experience.
  • FIG. 5 is a schematic structural diagram of a video decoding device provided by an embodiment of the present application.
  • the video decoding device includes a codeword extraction module 51 , an entropy decoding module 52 and a reconstruction processing module 53 .
  • the codeword extraction module 51 is configured to obtain the codeword to be decoded from the video frame code stream to be decoded according to the set codeword length, and the set codeword length is set according to the number of operating system bits;
  • the entropy decoding module 52 is configured to 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 to obtain the entropy decoding result.
  • the decoding methods of entropy decoding include conventional entropy decoding and multi-bypass entropy decoding, conventional entropy decoding and multi-bypass
  • the entropy decoding is 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.
  • the codeword to be decoded is obtained from the video frame code stream to be decoded according to the set codeword length determined according to the number of operating system bits, 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 operating system bits. Each time the codeword to be decoded is subsequently read, the memory addressing is to the number of bits of the operating system.
  • Alignment effectively reducing the single read time and the number of memory reads, and performing entropy decoding on multiple to-be-decoded codewords through multi-bypass decoding, reducing the calculation amount and time-consuming of entropy decoding without the need to design separate hardware circuit, and effectively improves the video decoding speed without opening multiple decoding threads.
  • the entropy decoding engine when the entropy decoding engine performs entropy decoding on the codeword to be decoded to obtain the entropy decoding result, it is configured as follows:
  • the bits to be decoded are decoded based on the determined decoding method to obtain the entropy decoding result.
  • the entropy decoding engine when the entropy decoding engine decodes the bits to be decoded based on a determined decoding method to obtain the entropy decoding result, the entropy decoding engine is configured as follows:
  • the decoding method based on 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 based on the quantized coding interval, and the bits to be decoded are determined based on the comparison result between the probability symbol interval and the interval offset value.
  • the decoding method based on the bits to be decoded is multi-bypass entropy decoding, and the entropy decoding results are obtained by performing multi-bypass entropy decoding on the bits to be decoded according to the number of entropy decoding results that need to be parsed.
  • the probability symbol interval includes a high probability symbol interval and a small probability symbol interval
  • the entropy decoding engine determines the entropy decoding result of the bits to be decoded based on the comparison result between the probability symbol interval and the interval offset value, and is configured as:
  • the entropy decoding result of the bit to be decoded is set to the small 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 update the coding interval through the small 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.
  • the configuration is:
  • a shift operation is performed on the interval offset value, and the OR operation result of the interval offset value after the shift operation and the bits to be decoded is assigned to the interval offset value , and determine the entropy decoding result of the bits to be decoded based on the comparison operation result between the assigned interval offset value and the coding interval;
  • a shift operation corresponding to the number of entropy decoding results is performed on the interval offset value, and the sum of the interval offset value after the shift operation and the entropy decoding result are
  • the OR operation result of the corresponding number of bits to be decoded is assigned to the interval offset value, and the entropy decoding result of the number of bits to be decoded corresponding to the number of entropy decoding results is determined based on the division operation result of the assigned interval offset value and the coding interval.
  • the configuration is:
  • the entropy decoding result of the bit to be decoded is set to the second preset value, and the interval offset is updated by the difference between the interval offset value and the high probability symbol interval. shift value;
  • the entropy decoding result of the bit to be decoded is set to the third preset value.
  • the entropy decoding engine is configured to decode the bits to be decoded based on the determined decoding method to obtain the entropy decoding result, and normalize the interval offset value and the encoding interval in response to the encoding interval being smaller than the set accuracy threshold. ization operation.
  • the video decoding device further includes an engine initialization module.
  • the engine initialization module is configured to initialize the interval offset value and coding interval of the entropy decoding engine according to the set codeword length.
  • the entropy decoding engine is configured to convert the storage method of the codewords to be decoded from big-endian to little-endian after obtaining the codewords to be decoded from the video frame code stream to be decoded according to the set codeword length. sequence.
  • the various units and modules included are only divided according to functional logic, but are not limited to the above divisions, as long as they can realize the corresponding functions; in addition, each unit and module is not limited to the above division.
  • 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 application.
  • FIG. 6 is a schematic structural diagram of a video decoding device provided by an embodiment of the present application.
  • 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 configured to store one or more programs; when one or more programs are processed by one or more Multiple processors 61 execute, so that 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 configured to execute the video decoding method provided in any of the above embodiments, and have corresponding functions and beneficial effects.
  • Embodiments of the present application also provide a storage medium that stores computer-executable instructions. When executed by a computer processor, the computer-executable instructions are configured to perform the video decoding method as provided in the above embodiments.
  • the embodiments of the present application provide a storage medium that stores computer-executable instructions.
  • the computer-executable instructions are not limited to the video decoding method provided above, and can also execute the video decoding method provided by any embodiment of the application.
  • the video decoding device, equipment and storage medium provided in the above embodiments can execute the video decoding method provided in any embodiment of this application.
  • Video decoding method For technical details that are not described in detail in the above embodiments, please refer to the technical details provided in any embodiment of this application. Video decoding method.
  • various aspects of the method provided by the present disclosure can also be implemented in the form of a program product, which includes program code.
  • the program code is configured to cause the above computer to
  • the device performs the steps in the methods described above in this specification according to various exemplary embodiments of the present disclosure.
  • the computer device may perform the video decoding method recorded in the embodiments of the present disclosure.
  • the program product can use any combination of one or more readable media.

Abstract

本申请实施例提供了一种视频解码方法、装置、设备及存储介质。本申请实施例提供的技术方案通过按照根据操作系统位数确定的设定码字长度从待解码视频帧码流中获取待解码码字,并将待解码码字提交给熵解码引擎进行熵解码得到熵解码结果,并对熵解码结果进行重建处理得到重建帧,读取的待解码码字的长度与操作系统位数对齐,后续每次读取待解码码字时,内存寻址向操作系统位数对齐,有效减少单次读取时间以及内存读取的次数,并且通过多旁路解码对多个待解码码字进行熵解码处理,减少熵解码处理的计算量与耗时,在无需单独设计硬件电路,且无需开启多个解码线程的情况下,有效提升了视频解码速度。

Description

一种视频解码方法、装置、设备及存储介质
本申请要求在2022年06月22日提交中国专利局,申请号为202210720358.6的中国专利申请的优先权,该申请的全部内容通过引用结合在本申请中。
技术领域
本申请实施例涉及视频解码技术领域,尤其涉及一种视频解码方法、装置、设备及存储介质。
背景技术
在从PC互联网到移动互联网的发展过程中,信息的表现形式由最初的文字为主到图像逐减增多,再到现在的视频信息占据流量主体,使得视频解码技术由最初的广播电视系统逐渐拓展至移动端产品中。视频解码技术是指通过硬件解码器或者软件解码器,将从网络上下载到的二进制码流依照特定的语法,进行二进制解析与像素重建,进而拼凑成整帧提供给上层应用实现视频播放的过程。
视频解码主要包括熵解码和重建两大模块,其中重建模块多为规整型的数值计算与处理,优化程度相对较深;而对于熵解码模块,以HEVC(高效率视频编码国际标准)标准中采用的CABAC(基于上下文模型的二进制算术编码)熵解码为例,视频码流的解析是典型的串行模式,难以实现并行加速,成为解码器部署的速度瓶颈,尤其在算力受限的移动端,熵解码模块造成的解码速度较慢问题尤其突出。目前一般通过硬件电路单元设计或软件多线程并行的方式提高视频解码的效率,但是硬件电路单元设计的方式需要依赖于专门的电路结构,并且不同终端的实现方案也存在较大差异,在移动终端领域中受到较大限制;而软件多线程并行的方式会导致终端功耗的增加,容易造成终端耗电过快且发热明显,软件多线程并行在移动终端领域中也容易受到较大限制。
发明内容
本申请实施例提供一种视频解码方法、装置、设备及存储介质,以解决相关技术中视频解码加速方案在移动终端中效果较差的技术问题,在无需单独设 计硬件电路,且无需开启多个解码线程的情况下,有效提升了视频解码速度。
在第一方面,本申请实施例提供了一种视频解码方法,包括:
按照设定码字长度从待解码视频帧码流中获取待解码码字,所述设定码字长度根据操作系统位数进行设定;
将所述待解码码字添加到熵解码引擎中,由所述熵解码引擎对所述待解码码字进行熵解码得到熵解码结果,所述熵解码的解码方式包括常规熵解码和多旁路熵解码,所述常规熵解码和所述多旁路熵解码分别基于不同编码语法进行配置得到;
对所述熵解码结果进行重建处理得到重建帧。
在第二方面,本申请实施例提供了一种视频解码装置,包括码字提取模块、熵解码模块和重建处理模块,其中:
所述码字提取模块,配置为按照设定码字长度从待解码视频帧码流中获取待解码码字,所述设定码字长度根据操作系统位数进行设定;
所述熵解码模块,配置为将所述待解码码字添加到熵解码引擎中,由所述熵解码引擎对所述待解码码字进行熵解码得到熵解码结果,所述熵解码的解码方式包括常规熵解码和多旁路熵解码,所述常规熵解码和所述多旁路熵解码分别基于不同编码语法进行配置得到;
所述重建处理模块,配置为对所述熵解码结果进行重建处理得到重建帧。
在第三方面,本申请实施例提供了一种视频解码设备,包括:存储器以及一个或多个处理器;
所述存储器,配置为存储一个或多个程序;
当所述一个或多个程序被所述一个或多个处理器执行,使得所述一个或多个处理器实现如第一方面所述的视频解码方法。
在第四方面,本申请实施例提供了一种存储计算机可执行指令的存储介质,所述计算机可执行指令在由计算机处理器执行时配置为执行如第一方面所述的视频解码方法。
在第五方面,本申请实施例提供了一种计算机程序产品,该计算机程序产品包括计算机程序,该计算机程序存储在计算机可读存储介质中,设备的至少一个处理器从计算机可读存储介质读取并执行计算机程序,使得设备执行如第一方面所述的视频解码方法。
本申请实施例通过按照根据操作系统位数确定的设定码字长度从待解码视 频帧码流中获取待解码码字,并将待解码码字提交给熵解码引擎进行熵解码得到熵解码结果,并对熵解码结果进行重建处理得到重建帧,读取的待解码码字的长度与操作系统位数对齐,后续每次读取待解码码字时,内存寻址向操作系统位数对齐,有效减少单次读取时间以及内存读取的次数,并且通过多旁路解码对多个待解码码字进行熵解码处理,减少熵解码处理的计算量与耗时,在无需单独设计硬件电路,且无需开启多个解码线程的情况下,有效提升了视频解码速度。
附图说明
图1是本申请实施例提供的一种视频解码方法的流程图;
图2是本申请实施例提供的一种对待解码码字进行熵解码的流程示意图;
图3是相关技术中的常规解码流程示意图;
图4是本申请实施例提供的一种常规解码流程示意图;
图5是本申请实施例提供的一种视频解码装置的结构示意图;
图6是本申请实施例提供的一种视频解码设备的结构示意图。
具体实施方式
为了使本申请的目的、技术方案和优点更加清楚,下面结合附图对本申请具体实施例作进一步的详细描述。可以理解的是,此处所描述的具体实施例仅仅用于解释本申请,而非对本申请的限定。另外还需要说明的是,为了便于描述,附图中仅示出了与本申请相关的部分而非全部内容。在更加详细地讨论示例性实施例之前应当提到的是,一些示例性实施例被描述成作为流程图描绘的处理或方法。虽然流程图将各项操作(或步骤)描述成顺序的处理,但是其中的许多操作可以被并行地、并发地或者同时实施。此外,各项操作的顺序可以被重新安排。当其操作完成时上述处理可以被终止,但是还可以具有未包括在附图中的附加步骤。上述处理可以对应于方法、函数、规程、子例程、子程序等等。
图1给出了本申请实施例提供的一种视频解码方法的流程图,本申请实施例提供的视频解码方法可以由视频解码装置来执行,该视频解码装置可以通过硬件和/或软件的方式实现,并集成在视频解码设备(例如手机、平板)中。
下述以视频解码装置执行视频解码方法为例进行描述。参考图1,该视频解码方法包括:
S110:按照设定码字长度从待解码视频帧码流中获取待解码码字,设定码字长度根据操作系统位数进行设定。
本方案提供的待解码视频帧码流通过对二进制码流进行拆包组帧处理得到,以例如在视频解码设备中的视频相关应用接收到互联网服务端发送的二进制码流(例如视频解码设备中的视频相关应用根据具体需求,例如进行观看直播、点播、视频会议等操作时,视频解码设备中的应用层向服务端发出视频获取请求并拉取特定的二进制码流,并将获取的二进制码流缓存至本地内存中)后,将二进制码流进行拆包与组帧,并将拆分封装位于不同传输包中的二进制码流去除封装信息,组合成完整的待解码视频帧码流,等待进行解码处理(包括基于HEVC标准采用的CABAC熵解码与重建处理)。
示例性的,在获取待解码视频帧码流后,按照设定码字长度从待解码视频帧码流中提取待解码码字。其中,本方案提供的设定码字长度根据操作系统位数进行设定,例如在视频解码设备的操作系统为64位或32位的操作系统时,设定码字长度为64位或32位,即采用64位或32位地址进行内存寻址,每次从本地内存的待解码视频帧码流中获取长度为64bit或32bit的待解码码字,只需要保证码流缓存的首地址是64位或32位对齐的,后续每次读取待解码码字时寻址都是向64位或32位对齐的,对内存寻址和缓存预取更为友好。相比传统解码器每次读取32bit或16bit(位数少于操作系统位数)的方式,在保证解码视频质量的前提下,能够显著减少内存读取的次数以及单次读取时间,提升视频解码效率。
在一个可能的实施例中,在二进制码流的编码方式对应的数据存放方式与操作系统的存放方式不一致时,可对待解码码字的存放方式进行转换,以适应操作系统。基于此,本方案在按照设定码字长度从待解码视频帧码流中获取待解码码字之后,还包括:将待解码码字的存放方式从大端序转换为小端序。
示例性的,以基于HEVC标准采用的CABAC编码,本方案提供的视频解码设备以x86或arm体系架构搭建为例,由于HEVC编码码流的存放方式属于大端序,而x86和arm体系架构均默认采用小端序,需要将取出的64bit或32bit的待解码码字码字由大端序转换为小端序,以保证正确解析码流。
S120:将待解码码字添加到熵解码引擎中,由熵解码引擎对待解码码字进 行熵解码得到熵解码结果,熵解码的解码方式包括常规熵解码和多旁路熵解码,常规熵解码和多旁路熵解码分别基于不同编码语法进行配置得到。
示例性的,在从待解码视频帧码流中提取出待解码码字后,将待解码码字添加到熵解码引擎中,由熵解码引擎对待解码码字进行熵解码并得到熵解码结果。
本方案提供的熵解码引擎对待解码码字进行熵解码的解码方式包括常规熵解码(Normal bin熵解码)和多旁路熵解码(Bypass多bins解码),并且常规熵解码和多旁路熵解码分别基于不同编码语法进行配置得到。其中常规熵解码单次可解析出一个熵解码结果,多旁路解码单次可解析出一个或多个熵解码结果。不同编码语法在二进制码流中的排列顺序以及编解码类型可由国际视频编码标准HEVC/H265规定好,熵解码引擎可按照国际视频编码标准规定的解码顺序进行设计,并在不同的解码阶段调用不同的解码方式进行熵解码。例如在熵解码变换块时,依次要解析的语法是块划分标志、cbf标志、量化系数绝对值和量化系数正负号,熵解码引擎对解码方式的调用顺序依次为常规熵解码、常规熵解码、常规熵解码和多旁路熵解码。
在一个可能的实施例中,如图2提供的一种对待解码码字进行熵解码的流程示意图所示,本方案提供的熵解码引擎对待解码码字进行熵解码得到熵解码结果时,包括步骤S1021-S1022:
S121:依次从待解码码字中获取待解码比特,并根据待解码比特所属编码语法确定解码方式。
S122:基于确定的解码方式对待解码比特进行解码得到熵解码结果。
示例性的,在待解码码字中包括一个或多个基于不同编码语法生成的待解码比特(bit),熵解码引擎在获取到待解码码字后,依次从待解码码字中获取待解码比特,并确定这些待解码比特所属编码语法,并确定这些编码语法对应的解码方式。在确定这些待解码比特对应的解码方式后,基于对应的解码方式对这些待解码比特进行解码得到熵解码结果。在得到每个待解码比特对应的熵解码结果后,可基于多个待解码比特的熵解码结果得到待解码码字对应的熵解码结果。在完成当前待解码码字的熵解码后,可继续按照设定码字长度从待解码视频帧码流中提取下一段待解码码字进行熵解码,而熵解码得到的熵解码结果可进行下一步的重建处理。
在一个可能的实施例中,本方案提供的视频解码方法在每次进行一个待解 码画面帧(每个画面帧包括多个待解码码字)的解码时,先对熵解码引擎进行初始化,例如根据设定码字长度初始化熵解码引擎的区间偏移值和编码区间,以完成熵解码引擎的初始化。
其中,熵解码引擎主要基于编码区间(range)和区间偏移值(offset)两个元素进行熵解码,HEVC标准下的编码区间在熵解码过程中不断递归划分,每次划分都将编码区间划分为大概率符号区间(rmps)和小概率符号区间(rlps),通过观察区间偏移值落入大概率符号区间还是小概率符号区间,以决策出熵解码结果对应的解码值(bin=0或bin=1)。每确定一个熵解码结果后,判断编码区间是否小于设定精度阈值,例如将设定精度阈值设置为256,若更新后的编码区间小于256,则需要对编码区间进行归一化操作,扩大编码区间以保证下一个熵解码结果的解析精度。其中,对编码区间的归一化操作类似重新对编码区间初始化,即将编码区间重新扩展至与操作系统位数对齐的精度(例如将编码区间重新扩展至9bit),并更新区间偏移值与缓存码字,其包含大量的移位操作和码流读取过程,本方案通过增加编码区间与区间偏移值的初始位数,显著增加编码区间的递归划分次数,降低编码区间小于256的概率,减少归一化次数,减少熵解码处理耗时。基于此,本方案在HEVC标准的基础上进行了针对性优化,HEVC标准采用510也即9个bit长度作为编码区间,区间偏移值初始化为码字的前9个bit所代表的数值,本方案为了降低归一化计算的次数,同时为了将内存操作和变量操作向操作系统位数(以64位操作系统为例)对齐,采用对编码区间进行偏移的方式,由9bit扩展至64bit长度,即编码区间初始值变为510<<55,同时区间偏移值初始偏移值对应变更为码字的前64bit所代表的数值,使得支持的区间递归划分次数增多,从而有效减少归一化的次数。另外,由于区间偏移值的初始化需要最少64bit长度的码字,需要将待解码码字的缓存单位变更为64bit,即每次从二进制码流中取出64bit的待解码码字备用。
在一个可能的实施例中,熵解码引擎根据待解码比特所属编码语法确定对待解码比特的解码方式,基于此,本方案提供的熵解码引擎在基于确定的解码方式对待解码比特进行解码得到熵解码结果时,包括:
S1221:基于待解码比特的解码方式为常规熵解码,对待解码比特进行编码区间量化,根据量化后的编码区间确定对应的概率符号区间,并根据概率符号区间与区间偏移值的比较结果确定待解码比特的熵解码结果。
S1222:基于待解码比特的解码方式为多旁路熵解码,根据需要解析的熵解 码结果数量对待解码比特进行多旁路熵解码得到熵解码结果。
示例性的,在确定对待解码比特的解码方式为常规熵解码时,对待解码比特进行编码区间量化,根据预先设定的概率状态转移表确定量化后的编码区间对应的概率符号区间(概率符号区间包括大概率符号区间或小概率符号区间)。将对应的概率符号区间与区间偏移值进行比较,根据概率符号区间与区间偏移值的比较结果确定当前待解码比特的熵解码结果,即根据概率符号区间与区间偏移值的比较结果确定区间偏移值是落入大概率符号区间还是小概率符号区间,并在偏移值落入大概率符号区间时,将大概率符号值作为熵解码结果对应的解码值(即解码值bin=val_mps),而在偏移值落入小概率符号区间时,将小概率符号值作为熵解码结果对应的解码值(即解码值bin=val_lps)。其中,大概率符号值val_mps是一个与概率状态、量化系数相关的动态变化值,其随概率状态变化而不断更新,并且与小概率符号值val_lps值相反,即当val_mps=0时,val_lps=1,当val_mps=1时,val_lps=0。
在一个可能的实施例中,在基于确定的解码方式对待解码比特进行解码得到熵解码结果之后,可根据量化后的编码区间对应的概率符号区间对编码区间和区间偏移值进行更新,在偏移值落入大概率符号区间时,利用大概率符号区间更新编码区间,而在偏移值落入小概率符号区间时,利用小概率符号区间更新编码区间,并利用大概率符号区间更新区间偏移值。例如对待解码比特进行编码区间量化后,根据结合当前的概率状态索引state,通过查找概率状态转移表得出小概率符号区间(根据编码区间与小概率符号区间的差可确定大概率符号区间),并将区间偏移值与大概率符号区间进行比较。在区间偏移值大于等于大概率符号区间时,将小概率符号值作为熵解码结果对应的解码值,并将区间偏移值和大概率符号区间的差值作为更新后的区间偏移值,以及将小概率符号区间作为更新后的区间偏移值;而在区间偏移值小于大概率符号区间时,将大概率符号值作为熵解码结果对应的解码值,并将大概率符号区间作为更新后的区间偏移值。
基于此,本方案提供的熵解码引擎在根据概率符号区间与区间偏移值的比较结果确定待解码比特的熵解码结果时,包括:
S12211:响应于区间偏移值大于等于大概率符号区间的比较结果,将待解码比特的熵解码结果设置为小概率符号值,并通过区间偏移值和大概率符号区间的差值更新区间偏移值,以及通过小概率符号区间更新编码区间。
S12212:响应于区间偏移值小于大概率符号区间的比较结果,将待解码比特的熵解码结果设置为大概率符号值,并通过大概率符号区间更新编码区间。
示例性的,在对待解码比特进行编码区间量化,并根据量化后的编码区间确定对应的概率符号区间后,将概率符号区间中的大概率符号区间与区间偏移值进行比较。
在区间偏移值大于等于大概率符号区间时,认为偏移值落入小概率符号区间,则将小概率符号值作为待解码比特的熵解码结果(即熵解码结果bin=val_lps),并通过区间偏移值和大概率符号区间的差值更新区间偏移值(即offset-=offset-rmps),完成区间偏移值的更新,以及通过小概率符号区间更新区间偏移值(即range=rlps),完成编码区间的更新。
而在区间偏移值小于大概率符号区间时,认为偏移值落入大概率符号区间,则将大概率符号值作为待解码比特的熵解码结果(即熵解码结果bin=val_mps),并通过大概率符号区间更新区间偏移值(即range=rmps),完成编码区间的更新。
在一个可能的实施例中,本方案提供的熵解码引擎在基于确定的解码方式对待解码比特进行解码得到熵解码结果之后,还包括:响应于编码区间小于设定精度阈值,对区间偏移值和编码区间进行归一化操作。
示例性的,在每次解析待解码比特得到熵解码结果并更新编码区间之后,将更新后的编码区间与设定精度阈值(例如256)进行比较,在编码区间小于设定精度阈值时,表示当前编码区间已经过小,不能满足下一个熵解码结果的解析精度,需要对区间偏移值和编码区间进行归一化操作,即将区间偏移值和编码区间重新扩展至64bit,同时从二进制码流中读取新的64bit的待解码码字,保证解析出的熵解码结果的解析精度。
在相关技术中,如图3提供的相关技术中的常规解码流程示意图所示,国际视频编码标准HEVC规定初始编码区间为510,其采用9个bit表示,通过9个bit表示0-512的区间范围,区间偏移值根据码字的前9bit进行赋值,编码区间的区间量化过程基于qnt_range=(range>>6)&3进行,相当于以26为单位对编码区间进行量化,并取前缀1之后的2位结果作为区间量化值,结合当前的概率状态索引state,查找概率状态转移表得出小概率符号区间(rlps=table[state][qnt_range]),与区间范围做减法可得大概率符号区间(rmps),依据区间偏移值offset与大概率符号区间rmps比较结果,判断出结果落入大概 率符号区间还是小概率符号区间,然后采取不同的区间范围更新策略,将大概率符号区间或小概率符号区间值设为新的区间范围(命中大概率符号区间值则将大概率符号区间值当作新的区间范围,命中小概率符号区间值则将小概率符号区间值当作新的区间范围);当区间范围小于256时,代表区间范围精度需要提升,会执行一次归一化操作(re-normalization),输出已经解析出的熵解码结果bin,并将区间范围重新归一化至510。
图4为本申请实施例提供的一种常规解码流程示意图,如图4所示,本方案换编码区间、区间偏移值和概率符号区间扩展到与操作系统位数相同的位数(如64位)上进行计算与比较,即每次获取的待解码码字的长度为64bit,编码区间赋值扩展至64bit,区间偏移值根据待解码码字前64bit进行赋值。本方案将编码区间由原来的9bit扩展至64bit,以初始值510<<55开始递归划分,在划分过程中,编码区间不断变小出现无用的前缀0,此时编码区间包括前缀0、9bit有效位、后缀0三部分,根据9bit首位非0原则,通过CLZ指令可以得出前缀0的位数clz,并且后缀0个数为64-9-clz=55-clz,则编码区间量化过程变为(range>>(55-clz)>>6)&3=(range>>(61-clz))&3。
然后,根据编码区间量化值与概率状态值查找概率状态转移表可得小概率符号区间(rlps=table[state][qnt_range]<<(55-clz)),此时查概率状态转移表得到的rlps仍为9bit范围值,需要对齐到编码区间64bit中的有效9bit位置,实际为小概率符号区间rlps添加上相同的后缀0即可,即rlps<<(55-clz)。大概率符号区间rmps的计算公式不变,依旧为range-rlps。比较区间偏移值offset与大概率符号区间rmps,若offset≥rmps,代表以该offset偏移会落入小概率符号区间rlps,熵解码结果bin=val_lps,并使用小概率符号区间rlps更新编码区间range。若offset<rmps,代表以该offset偏移会落入大概率符号区间,熵解码结果bin=val_mps,并使用大概率符号区间rmps更新range。同时每次解析完一个熵解码结果后,检查编码区间是否小于256,编码区间小于256,则认为当前编码区间已经过小,不能满足下一个熵解码结果的解析精度,需要执行归一化操作(re-normalization),将编码区间和区间偏移值重新扩展至64bit,同时从二进制码流中读取新的64bit的待解码码字。
可以理解的是,目前市场中主流的移动端设备均为64bit设计,移动端设备处理器的高速缓存cache,缓存单位一般为64bit,因此本方案通过对齐操作系统位数可利于内存的读写与数据处理。另外,以64bit长度对编码区间进行递归划 分相比相关技术中以9bit对编码区间进行递归划分,本方案可支持的划分次数更多,能够大幅降低编码区间小于256的概率,有效减少归一化的次数以及绝对计算量,并且进入归一化分支的可能性降低,分支预测更加准确,减少分支预测失误造成的耗时。
在确定对待解码比特的解码方式为多旁路熵解码时,则根据在前解码得到的熵解码结果(在开始多旁路熵解码之前,会先根据已经解出来的熵解码结果判断多旁路解码应该解析多少的待解码比特,对待解码比特的解码结果即为熵解码结果)确定当前需要解析的熵解码结果数量,并根据需要解析的熵解码结果数量对待解码比特进行多旁路熵解码得到熵解码结果。
在对待解码比特进行多旁路熵解码时,可根据需要解析的熵解码结果数量,将对单个待解码比特进行熵解码需要的计算与赋值过程进行合并,重复计算与赋值等计算过程可直接采用单条指令一次性完成,替换掉了原来对多个待解码比特进行熵解码的多次重复的计算与赋值过程。
在一个可能的实施例中,本方案提供的熵解码引擎在根据需要解析的熵解码结果数量对待解码比特进行多旁路熵解码得到熵解码结果时,包括:
S12221:响应于需要解析的熵解码结果数量为第一预设值,对区间偏移值进行移位操作,将移位操作后的区间偏移值和待解码比特的或运算结果赋值给区间偏移值,并根据赋值得到的区间偏移值与编码区间的比较运算结果确定待解码比特的熵解码结果。
S12222:响应于需要解析的熵解码结果数量大于第一预设值,对区间偏移值进行与熵解码结果数量对应的移位操作,将移位操作后的区间偏移值和与熵解码结果数量对应的待解码比特的或运算结果赋值给区间偏移值,并根据赋值得到的区间偏移值与编码区间的除法运算结果确定与熵解码结果数量对应的待解码比特的熵解码结果。
示例性的,在对待解码比特进行多旁路熵解码时,确定需要解析的熵解码结果数量,并在需要解析的熵解码结果数量为第一预设值(例如第一预设值为1,即当前多旁路熵解码只需要对一个待解码比特进行熵解码)时,对区间偏移值进行移位操作(将区间偏移值向左移位一次,即offset=offset<<1)。
在一个实施例中,将移位操作后的区间偏移值和待解码比特的进行或运算,并将区间偏移值和待解码比特的或运算结果赋值给区间偏移值(即offset|=read_bits)。将根据赋值得到的区间偏移值与编码区间进行比较,根据区 间偏移值与编码区间的比较运算结果确定待解码比特的熵解码结果,例如在区间偏移值大于编码区间时,确定熵解码结果为第二预设值(例如bin=1),而在区间偏移值小于或等于编码区间时,确定熵解码结果为第三预设值(例如bin=0)。
在一个可能的实施例中,本方案提供的熵解码引擎在根据赋值得到的区间偏移值与编码区间的比较运算结果确定待解码比特的熵解码结果时,包括:响应于赋值得到的区间偏移值大于编码区间的比较运算结果,将待解码比特的熵解码结果设置为第二预设值,并通过区间偏移值和大概率符号区间的差值更新区间偏移值;响应于赋值得到的区间偏移值小于等于编码区间的比较运算结果,将待解码比特的熵解码结果设置为第三预设值。
示例性的,在赋值得到的区间偏移值大于编码区间时,将待解码比特的熵解码结果设置为第二预设值(例如将待解码比特的熵解码结果设置为1),并通过区间偏移值和大概率符号区间的差值更新区间偏移值(即offset-=range)。而在赋值得到的区间偏移值小于等于编码区间时,则将待解码比特的熵解码结果设置为第三预设值(例如将待解码比特的熵解码结果设置为0)。其中,在多旁路解码流程中,概率符号区间对应的符号概率始终等于0.5,大概率符号区间和小概率符号区间相等,编码区间的大小是固定的,也不需要对编码区间进行更新。
示例性的,在需要解析的熵解码结果数量大于第一预设值时,则对区间偏移值进行与熵解码结果数量对应的移位操作(将区间偏移值向左移位与需要解析的熵解码结果数量相同的次数),将移位操作后的区间偏移值和与需要解析的熵解码结果数量对应的待解码比特进行或运算(将区间偏移值同时和多个待解码比特进行或运算),并将或运算结果赋值给区间偏移值,并根据赋值得到的区间偏移值与编码区间的除法运算结果确定与熵解码结果数量对应的待解码比特的熵解码结果。其中,区间偏移值与编码区间比较得到熵解码结果的过程则与除法类似,对区间偏移值与编码区间做除法运算(即offset/range)的结果等同于多次(与熵解码结果数量一致)比较区间偏移值与编码区间后的熵解码结果。
需要进行解释的是,多旁路解码存在解析一熵解码结果和解析连续多个熵解码结果两种情况。解析一个熵解码结果的熵解码流程包含一次区间偏移值向左移位、一次区间偏移值和待解码码字中的单个待解码比特的或运算、一次区 间偏移值、编码区间的比较运算以及熵解码结果的赋值等过程。而解析连续多个熵解码结果与解析一个熵解码结果过程类似,属于上述过程的重复循环,这为运算合并、一次性解析多个熵解码结果提供了可能。其中重复的移位、或运算可直接采用单条指令一次性完成。假设待解析的熵解码结果个数为5,则执行5次offset<<1、offset|=read_bits(1),上述运算可以合并为offset<<5、offset|=read_bits(5)。区间偏移值与编码区间比较得到熵解码结果的过程则与除法类似,offset/range的结果等同于5次比较区间偏移值与编码区间后的熵解码结果。另外,多旁路解码只有在熵解码结果为第二预设值(即bin=1)时才会执行区间偏移值更新操作(即offset-=range),因此,在最后使用除法得到5个熵解码结果总值后,使用基于公式offset=offset-bins*range即可一次性得到更新后最终的区间偏移值。本方案在对多个待解码比特进行多旁路解码时,采用一次移位、一次或运算、一次除法、一次乘法,替换掉了原来的多次移位、多次或运算、多次比较与赋值过程,可显著降低解码时间,提升解码速度。
S130:对熵解码结果进行重建处理得到重建帧。
示例性的,在得到熵解码处理结果后,可对熵解码结果进行重建处理得到重建帧。其中,熵解码是基于二进制解析规则,把二进制码流(待解码码字)解析成各种类型、长度的数值,熵解码引擎依照国际视频编码标准HEVC规定的语法顺序,将这些解析出来的数值赋以实际含义,如视频的宽高尺寸、量化步长、参考帧号以及残差系数等各种信息,这些信息可作为完成下一步的视频重建的数据。
例如,对熵解码结果进行的重建处理包含反变换、反量化、预测解码、后处理滤波等流程,负责完成一帧像素值的重建。其中,反变换负责将解析出的变换系数(熵解码引擎会根据待解码码字解析出大量的语法信息,在这些语法信息中占比最高的是变换系数,变换系数是每一视频帧的所有像素残差值在变换域的映射)从变换域映射到像素域得到像素残差系数,反量化负责根据量化步长进一步将像素残差系数补偿成尽可能连续的残差值,预测解码负责通过帧内/帧间预测得到预测块,并与像素残差系数叠加完成初步重建,后处理滤波根据滤波参数确定采用去块滤波和样点自适应补偿,以去除重建帧的块效应与振铃效应,完成一帧的重建得到重建帧。
在一个可能的实施例中,在对熵解码结果进行重建处理得到重建帧后,可将解码成功的信号以及重建帧的内存地址发送给应用层,由应用层基于重建帧 进行视频画面的显示。应用层在接收到解码器(包括熵解码引擎和重建模块)返回的解码成功的信号,从解码器提供的内存地址拷贝出解码完成的视频帧,再经过渲染、缩放、美颜等一系列图像处理后即可进行显示。
上述,通过按照根据操作系统位数确定的设定码字长度从待解码视频帧码流中获取待解码码字,并将待解码码字提交给熵解码引擎进行熵解码得到熵解码结果,并对熵解码结果进行重建处理得到重建帧,读取的待解码码字的长度与操作系统位数对齐,后续每次读取待解码码字时,内存寻址向操作系统位数对齐,有效减少单次读取时间以及内存读取的次数,并且通过多旁路解码对多个待解码码字进行熵解码处理,减少熵解码处理的计算量与耗时,在无需单独设计硬件电路,且无需开启多个解码线程的情况下,有效提升了视频解码速度。并显著降低移动终端解码HEVC视频的耗时,解决了由于CABAC熵解码造成的解码速度瓶颈问题,并通过调整熵解码引擎架构,使架构与移动终端相适配,减少了归一化计算的次数,并从内存、缓存读取以及分支预测的角度,提升解码速度。同时,通过多旁路解码的解码方式一次解析出多个熵解码结果,减少对多个待解码比特进行熵解码的绝对计算量,降低解码耗时。并减少对特殊硬件电路单元的依赖,在终端处理器上即可运行,易于部署,同时无需开启多个解码线程,以功耗增加为代价换取解码速度,实用性更高,视频播放流畅更高,并延长视频解码设备的电池可支撑播放时长,提供更加流畅且持久的观看体验。
图5是本申请实施例提供的一种视频解码装置的结构示意图。参考图5,该视频解码装置包括码字提取模块51、熵解码模块52和重建处理模块53。
其中,码字提取模块51配置为按照设定码字长度从待解码视频帧码流中获取待解码码字,设定码字长度根据操作系统位数进行设定;熵解码模块52配置为将待解码码字添加到熵解码引擎中,由熵解码引擎对待解码码字进行熵解码得到熵解码结果,熵解码的解码方式包括常规熵解码和多旁路熵解码,常规熵解码和多旁路熵解码分别基于不同编码语法进行配置得到;重建处理模块53配置为对熵解码结果进行重建处理得到重建帧。
上述,通过按照根据操作系统位数确定的设定码字长度从待解码视频帧码流中获取待解码码字,并将待解码码字提交给熵解码引擎进行熵解码得到熵解码结果,并对熵解码结果进行重建处理得到重建帧,读取的待解码码字的长度与操作系统位数对齐,后续每次读取待解码码字时,内存寻址向操作系统位数 对齐,有效减少单次读取时间以及内存读取的次数,并且通过多旁路解码对多个待解码码字进行熵解码处理,减少熵解码处理的计算量与耗时,在无需单独设计硬件电路,且无需开启多个解码线程的情况下,有效提升了视频解码速度。
在一个可能的实施例中,熵解码引擎对待解码码字进行熵解码得到熵解码结果时,配置为:
依次从待解码码字中获取待解码比特,并根据待解码比特所属编码语法确定解码方式;
基于确定的解码方式对待解码比特进行解码得到熵解码结果。
在一个可能的实施例中,熵解码引擎基于确定的解码方式对待解码比特进行解码得到熵解码结果时,配置为:
基于待解码比特的解码方式为常规熵解码,对待解码比特进行编码区间量化,根据量化后的编码区间确定对应的概率符号区间,并根据概率符号区间与区间偏移值的比较结果确定待解码比特的熵解码结果;
基于待解码比特的解码方式为多旁路熵解码,根据需要解析的熵解码结果数量对待解码比特进行多旁路熵解码得到熵解码结果。
在一个可能的实施例中,概率符号区间包括大概率符号区间和小概率符号区间,熵解码引擎根据概率符号区间与区间偏移值的比较结果确定待解码比特的熵解码结果,配置为:
响应于区间偏移值大于等于大概率符号区间的比较结果,将待解码比特的熵解码结果设置为小概率符号值,并通过区间偏移值和大概率符号区间的差值更新区间偏移值,以及通过小概率符号区间更新编码区间;
响应于区间偏移值小于大概率符号区间的比较结果,将待解码比特的熵解码结果设置为大概率符号值,并通过大概率符号区间更新编码区间。
在一个可能的实施例中,熵解码引擎根据需要解析的熵解码结果数量对待解码比特进行多旁路熵解码得到熵解码结果时,配置为:
响应于需要解析的熵解码结果数量为第一预设值,对区间偏移值进行移位操作,将移位操作后的区间偏移值和待解码比特的或运算结果赋值给区间偏移值,并根据赋值得到的区间偏移值与编码区间的比较运算结果确定待解码比特的熵解码结果;
响应于需要解析的熵解码结果数量大于第一预设值,对区间偏移值进行与熵解码结果数量对应的移位操作,将移位操作后的区间偏移值和与熵解码结果 数量对应的待解码比特的或运算结果赋值给区间偏移值,并根据赋值得到的区间偏移值与编码区间的除法运算结果确定与熵解码结果数量对应的待解码比特的熵解码结果。
在一个可能的实施例中,熵解码引擎根据赋值得到的区间偏移值与编码区间的比较运算结果确定待解码比特的熵解码结果时,配置为:
响应于赋值得到的区间偏移值大于编码区间的比较运算结果,将待解码比特的熵解码结果设置为第二预设值,并通过区间偏移值和大概率符号区间的差值更新区间偏移值;
响应于赋值得到的区间偏移值小于等于编码区间的比较运算结果,将待解码比特的熵解码结果设置为第三预设值。
在一个可能的实施例中,熵解码引擎配置为基于确定的解码方式对待解码比特进行解码得到熵解码结果之后,响应于编码区间小于设定精度阈值,对区间偏移值和编码区间进行归一化操作。
在一个可能的实施例中,视频解码装置还包括引擎初始化模块,引擎初始化模块配置为根据设定码字长度初始化熵解码引擎的区间偏移值和编码区间
在一个可能的实施例中,熵解码引擎配置为按照设定码字长度从待解码视频帧码流中获取待解码码字之后,将待解码码字的存放方式从大端序转换为小端序。
值得注意的是,上述视频解码装置的实施例中,所包括的各个单元和模块只是按照功能逻辑进行划分的,但并不局限于上述的划分,只要能够实现相应的功能即可;另外,各功能单元的具体名称也只是为了便于相互区分,并不用于限制本申请实施例的保护范围。
本申请实施例还提供了一种视频解码设备,该视频解码设备可集成本申请实施例提供的视频解码装置。图6是本申请实施例提供的一种视频解码设备的结构示意图。参考图6,该视频解码设备包括:输入装置63、输出装置64、存储器62以及一个或多个处理器61;存储器62,配置为存储一个或多个程序;当一个或多个程序被一个或多个处理器61执行,使得一个或多个处理器61实现如上述实施例提供的视频解码方法。上述提供的视频解码装置、设备和计算机可配置为执行上述任意实施例提供的视频解码方法,具备相应的功能和有益效果。
本申请实施例还提供一种存储计算机可执行指令的存储介质,计算机可执行指令在由计算机处理器执行时配置为执行如上述实施例提供的视频解码方法。当然,本申请实施例所提供的一种存储计算机可执行指令的存储介质,其计算机可执行指令不限于如上提供的视频解码方法,还可以执行本申请任意实施例所提供的视频解码方法中的相关操作。上述实施例中提供的视频解码装置、设备及存储介质可执行本申请任意实施例所提供的视频解码方法,未在上述实施例中详尽描述的技术细节,可参见本申请任意实施例所提供的视频解码方法。
在一些可能的实施方式中,本公开提供的方法的各个方面还可以实现为一种程序产品的形式,其包括程序代码,当上述程序产品在计算机设备上运行时,程序代码配置为使上述计算机设备执行本说明书上述描述的根据本公开各种示例性实施方式的方法中的步骤,例如,计算机设备可以执行本公开实施例所记载的视频解码方法。其中,程序产品可以采用一个或多个可读介质的任意组合。

Claims (13)

  1. 一种视频解码方法,其中,包括:
    按照设定码字长度从待解码视频帧码流中获取待解码码字,所述设定码字长度根据操作系统位数进行设定;
    将所述待解码码字添加到熵解码引擎中,由所述熵解码引擎对所述待解码码字进行熵解码得到熵解码结果,所述熵解码的解码方式包括常规熵解码和多旁路熵解码,所述常规熵解码和所述多旁路熵解码分别基于不同编码语法进行配置得到;
    对所述熵解码结果进行重建处理得到重建帧。
  2. 根据权利要求1所述的视频解码方法,其中,所述熵解码引擎对所述待解码码字进行熵解码得到熵解码结果时,包括:
    依次从所述待解码码字中获取待解码比特,并根据所述待解码比特所属编码语法确定解码方式;
    基于确定的解码方式对所述待解码比特进行解码得到熵解码结果。
  3. 根据权利要求2所述的视频解码方法,其中,所述基于确定的解码方式对所述待解码比特进行解码得到熵解码结果,包括:
    基于所述待解码比特的解码方式为常规熵解码,对所述待解码比特进行编码区间量化,根据量化后的所述编码区间确定对应的概率符号区间,并根据所述概率符号区间与区间偏移值的比较结果确定所述待解码比特的熵解码结果;
    基于所述待解码比特的解码方式为多旁路熵解码,根据需要解析的熵解码结果数量对所述待解码比特进行多旁路熵解码得到熵解码结果。
  4. 根据权利要求3所述的视频解码方法,其中,所述概率符号区间包括大概率符号区间和小概率符号区间,所述根据所述概率符号区间与区间偏移值的比较结果确定所述待解码比特的熵解码结果,包括:
    响应于区间偏移值大于等于大概率符号区间的比较结果,将所述待解码比特的熵解码结果设置为小概率符号值,并通过所述区间偏移值和大概率符号区间的差值更新所述区间偏移值,以及通过小概率符号区间更新所述编码区间;
    响应于区间偏移值小于大概率符号区间的比较结果,将所述待解码比特的熵解码结果设置为大概率符号值,并通过大概率符号区间更新所述编码区间。
  5. 根据权利要求3所述的视频解码方法,其中,所述根据需要解析的熵解码结果数量对所述待解码比特进行多旁路熵解码得到熵解码结果,包括:
    响应于需要解析的熵解码结果数量为第一预设值,对区间偏移值进行移位 操作,将移位操作后的所述区间偏移值和所述待解码比特的或运算结果赋值给所述区间偏移值,并根据赋值得到的所述区间偏移值与编码区间的比较运算结果确定所述待解码比特的熵解码结果;
    响应于需要解析的熵解码结果数量大于所述第一预设值,对区间偏移值进行与所述熵解码结果数量对应的移位操作,将移位操作后的所述区间偏移值和与所述熵解码结果数量对应的待解码比特的或运算结果赋值给所述区间偏移值,并根据赋值得到的所述区间偏移值与编码区间的除法运算结果确定与所述熵解码结果数量对应的待解码比特的熵解码结果。
  6. 根据权利要求5所述的视频解码方法,其中,所述根据赋值得到的所述区间偏移值与编码区间的比较运算结果确定所述待解码比特的熵解码结果,包括:
    响应于赋值得到的所述区间偏移值大于编码区间的比较运算结果,将所述待解码比特的熵解码结果设置为第二预设值,并通过所述区间偏移值和大概率符号区间的差值更新所述区间偏移值;
    响应于赋值得到的所述区间偏移值小于等于编码区间的比较运算结果,将所述待解码比特的熵解码结果设置为第三预设值。
  7. 根据权利要求3所述的视频解码方法,其中,所述基于确定的解码方式对所述待解码比特进行解码得到熵解码结果之后,还包括:
    响应于所述编码区间小于设定精度阈值,对所述区间偏移值和所述编码区间进行归一化操作。
  8. 根据权利要求3所述的视频解码方法,其中,所述视频解码方法还包括:
    根据设定码字长度初始化熵解码引擎的区间偏移值和编码区间。
  9. 根据权利要求1-8任一项所述的视频解码方法,其中,所述按照设定码字长度从待解码视频帧码流中获取待解码码字之后,还包括:
    将所述待解码码字的存放方式从大端序转换为小端序。
  10. 一种视频解码装置,其中,包括码字提取模块、熵解码模块和重建处理模块,其中:
    所述码字提取模块,配置为按照设定码字长度从待解码视频帧码流中获取待解码码字,所述设定码字长度根据操作系统位数进行设定;
    所述熵解码模块,配置为将所述待解码码字添加到熵解码引擎中,由所述熵解码引擎对所述待解码码字进行熵解码得到熵解码结果,所述熵解码的解码方式包括常规熵解码和多旁路熵解码,所述常规熵解码和所述多旁路熵解码分 别基于不同编码语法进行配置得到;
    所述重建处理模块,配置为对所述熵解码结果进行重建处理得到重建帧。
  11. 一种视频解码设备,其中,包括:存储器以及一个或多个处理器;
    所述存储器,配置为存储一个或多个程序;
    当所述一个或多个程序被所述一个或多个处理器执行,使得所述一个或多个处理器实现如权利要求1-9任一项所述的视频解码方法。
  12. 一种存储计算机可执行指令的存储介质,其中,所述计算机可执行指令在由计算机处理器执行时配置为执行如权利要求1-9任一项所述的视频解码方法。
  13. 一种计算机程序产品,包括计算机程序,其中,所述计算机程序被处理器执行时实现权利要求1-9任一项所述的视频解码方法。
PCT/CN2023/098928 2022-06-22 2023-06-07 一种视频解码方法、装置、设备及存储介质 WO2023246514A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202210720358.6A CN115334313A (zh) 2022-06-22 2022-06-22 一种视频解码方法、装置、设备及存储介质
CN202210720358.6 2022-06-22

Publications (1)

Publication Number Publication Date
WO2023246514A1 true WO2023246514A1 (zh) 2023-12-28

Family

ID=83916459

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2023/098928 WO2023246514A1 (zh) 2022-06-22 2023-06-07 一种视频解码方法、装置、设备及存储介质

Country Status (2)

Country Link
CN (1) CN115334313A (zh)
WO (1) WO2023246514A1 (zh)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115334313A (zh) * 2022-06-22 2022-11-11 百果园技术(新加坡)有限公司 一种视频解码方法、装置、设备及存储介质

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101505424A (zh) * 2009-01-21 2009-08-12 北京中星微电子有限公司 一种熵解码比特解析方法和一种熵解码器、视频解码芯片
US20160353108A1 (en) * 2015-05-29 2016-12-01 Qualcomm Incorporated Advanced arithmetic coder
CN109257048A (zh) * 2013-04-08 2019-01-22 索尼公司 解码数据值序列的方法、数据解码装置及视频接收机
CN111818335A (zh) * 2020-07-03 2020-10-23 Tcl华星光电技术有限公司 一种熵编码方法和装置、电子设备
CN112422987A (zh) * 2020-10-26 2021-02-26 眸芯科技(上海)有限公司 适用于avc的熵解码硬件并行计算方法及应用
CN115334313A (zh) * 2022-06-22 2022-11-11 百果园技术(新加坡)有限公司 一种视频解码方法、装置、设备及存储介质

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101505424A (zh) * 2009-01-21 2009-08-12 北京中星微电子有限公司 一种熵解码比特解析方法和一种熵解码器、视频解码芯片
CN109257048A (zh) * 2013-04-08 2019-01-22 索尼公司 解码数据值序列的方法、数据解码装置及视频接收机
US20160353108A1 (en) * 2015-05-29 2016-12-01 Qualcomm Incorporated Advanced arithmetic coder
CN111818335A (zh) * 2020-07-03 2020-10-23 Tcl华星光电技术有限公司 一种熵编码方法和装置、电子设备
CN112422987A (zh) * 2020-10-26 2021-02-26 眸芯科技(上海)有限公司 适用于avc的熵解码硬件并行计算方法及应用
CN115334313A (zh) * 2022-06-22 2022-11-11 百果园技术(新加坡)有限公司 一种视频解码方法、装置、设备及存储介质

Also Published As

Publication number Publication date
CN115334313A (zh) 2022-11-11

Similar Documents

Publication Publication Date Title
US7592937B1 (en) CABAC decoding unit and method
US7286066B1 (en) Acceleration of bitstream decoding
US20030118114A1 (en) Variable length decoder
CN111183647B (zh) 用于解码视频数据的方法、装置和计算机可读媒体
US6771196B2 (en) Programmable variable-length decoder
CN101562455B (zh) 内容可适性二元算数编码的译码装置及其译码方法
US11765390B2 (en) Non-transform coding
WO2023246514A1 (zh) 一种视频解码方法、装置、设备及存储介质
US10250912B2 (en) Method and apparatus for entropy decoding with arithmetic decoding decoupled from variable-length decoding
US10506258B2 (en) Coding video syntax elements using a context tree
US20060176960A1 (en) Method and system for decoding variable length code (VLC) in a microprocessor
US7298297B1 (en) Hardware-implemented Huffman decoder
WO2023040600A1 (zh) 图像编码方法、图像解码方法、装置、电子设备及介质
US9819957B2 (en) Method and apparatus for decoding a progressive JPEG image
Silveira et al. Efficient reference frame compression scheme for video coding systems: algorithm and VLSI design
US6987811B2 (en) Image processor and image processing method
US10194153B1 (en) Bin string coding based on a most probable symbol
US7333037B2 (en) Method and system for improved lookup table (LUT) mechanism for Huffman decoding
KR20200134155A (ko) 데이터 표본의 엔트로피 부호화 방법
TWI382766B (zh) 一種用於超高解析度之顯示框壓縮系統及方法
US10728578B2 (en) Bias minimization for successive image reconstruction based on embedded codec circuitry
EP2293569A1 (en) CABAC decoding unit and method
CN113905233A (zh) 基于音频视频编码标准的熵解码方法、可读介质及其电子设备
CN116982314A (zh) 系数编解码方法、编解码设备、终端及存储介质
CN101188753A (zh) 一种视频熵解码查找表结构及相应的视频熵解码方法

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 23826163

Country of ref document: EP

Kind code of ref document: A1