Video decoding method, chip, medium, product and electronic equipment

By predicting and calculating the context model of the syntax elements to be decoded in advance and decoding them directly, the problem of low video decoding efficiency in the existing technology is solved and more efficient video data processing is achieved.

CN118631996APending Publication Date: 2024-09-10ARM TECH CHINA CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410705087.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-05-31
Publication Date
2024-09-10

AI Technical Summary

Technical Problem

Existing video decoding methods rely on information about neighboring pixels, resulting in low decoding efficiency and inability to efficiently process video data.

Method used

By predicting and calculating the context model of the syntax element to be decoded in advance, decoding is performed directly, avoiding waiting for the context model selection result of the next syntax element to be decoded, and improving video decoding efficiency.

Benefits of technology

It improves the video decoding efficiency, reduces the waiting time during the decoding process, and increases the speed of video data processing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118631996A
    Figure CN118631996A
Patent Text Reader

Abstract

The invention relates to the field of video coding and decoding, and discloses a video decoding method, a chip, a medium, a product and electronic equipment. A context model corresponding to at least one syntax element decoded after the first syntax element may be predicted based on the set of values of the first syntax element. After a decoding result of the first syntax element is obtained, a second syntax element corresponding to the decoding result of the first syntax element can be selected from the at least one syntax element, and the second syntax element is decoded based on a predicted context model corresponding to the second syntax element. Therefore, the next to-be-decoded element can be directly decoded according to the context model determined in advance without waiting for the selection result of the context model of the next to-be-decoded element after the decoding result of the to-be-decoded element is determined, so that the video decoding efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of video encoding and decoding, and in particular to a video decoding method, chip, medium, product and electronic device. Background Art

[0002] Currently, context models are used for encoding audio and video. That is to say, each pixel needs to be encoded in a certain order, and the information of the pixels that are adjacent to the pixel to be encoded and have not been encoded is used to encode the pixel to be encoded. Furthermore, in the video decoding stage, the pixels need to be decoded in the opposite order. For example, pixel 1 uses the information of the next pixel 2 when encoding. Therefore, in the decoding stage, pixel 2 needs to be decoded before pixel 1 can be decoded.

[0003] Since the calculation of the context model requires the use of information from neighboring pixels, one pixel must be decoded before the next pixel can be decoded, which results in low video decoding efficiency. Summary of the invention

[0004] In view of this, embodiments of the present application provide a video decoding method, chip, medium, product, and electronic device.

[0005] In a first aspect, an embodiment of the present application provides a video decoding method, characterized in that the method includes: obtaining multiple syntax elements in a to-be-decoded image, the multiple syntax elements including a first syntax element, the decoding result of the first syntax element being one of N decoding results, and N being an integer greater than 0; in a process of decoding the first syntax element, predicting N next syntax elements to be decoded corresponding to the N decoding results in the multiple syntax elements, and a context model corresponding to each syntax element in the N next syntax elements to be decoded; the decoding result corresponding to the first syntax element is a first decoding result in the N decoding results, and based on the context model corresponding to a second syntax element in the N next syntax elements to be decoded that corresponds to the first decoding result, decoding a second syntax element.

[0006] In the above scheme, after determining the decoding result of the first syntax element, it is not necessary to wait for the selection result of the context model of the next syntax element to be decoded, but the next syntax element to be decoded can be directly decoded according to the context model determined in advance, thereby improving the video decoding efficiency. Among them, a syntax element to be decoded corresponding to a decoding result may have multiple decoding results corresponding to the same syntax element to be decoded. For example, no matter how many decoding results a syntax element has, the next syntax element to be decoded is the same syntax element.

[0007] In combination with the first aspect, in some implementations, the decoding result of the second syntax element is one of M decoding results, where M is an integer greater than 0, and the method further includes: in a process of decoding the first syntax element or a process of decoding the second syntax element, predicting M syntax elements to be decoded after the second syntax element corresponding to the M decoding results among multiple syntax elements, and a context model corresponding to each syntax element among the M syntax elements to be decoded after the second syntax element; the decoding result corresponding to the second syntax element is the second decoding result among the M decoding results, and decoding the third syntax element based on the context model corresponding to a third syntax element corresponding to the second decoding result among the M syntax elements to be decoded after the second syntax element.

[0008] In the above scheme, the context models of more syntax elements can be further predicted, for example, including predicting the decoding results of the N next syntax elements to be decoded, and then determining the next syntax element and its context model corresponding to each decoding result. Furthermore, after obtaining the result of the second syntax element, the next syntax element can be directly decoded without waiting for the context model selection result of the next syntax element, thereby improving the video decoding efficiency.

[0009] In combination with the first aspect, in some implementations, corresponding to an image to be decoded that is encoded using the audio and video coding standard AVS, multiple syntax elements are syntax elements defined in the audio and video coding standard AVS; or, corresponding to an image to be decoded that is encoded using the general video coding VVC standard, multiple syntax elements are syntax elements defined in the video coding VVC standard; or, corresponding to an image to be decoded that is encoded using the high-efficiency video compression coding HEVC standard, multiple syntax elements are syntax elements defined in the high-efficiency video compression coding HEVC standard.

[0010] In the above scheme, the syntax elements are the syntax elements specified by various audio and video decoding standards. For example, before encoding each pixel, the information of the pixel can be extracted through intra-frame prediction, inter-frame prediction, motion estimation, motion compensation, etc., and the information of the pixel is represented by multiple syntax elements. Different syntax elements are used to represent different information of the pixel, such as the prediction type of the pixel, the quantization parameter, etc.

[0011] In combination with the first aspect, in some implementations, the context model is used to perform probability estimation on the corresponding grammatical elements.

[0012] In the above scheme, the video coding protocol also defines multiple context models for different syntax elements based on the possible values ​​of each syntax element, wherein the context model is specifically a probability model, which specifies the initial value probability of 0 and 1 in the syntax element, that is, the context model is used to perform probability estimation on the syntax element.

[0013] In combination with the first aspect, in some implementations, the image to be decoded includes multiple pixels, wherein the first syntax element is a syntax element of a first pixel among the multiple pixels, the second syntax element is a syntax element of the first pixel whose decoding order is after the first syntax element, or the second syntax element is a syntax element of a second pixel among the multiple pixels.

[0014] In the above scheme, the next syntax element to be decoded may be a syntax element of the same pixel or a syntax element of a different pixel. Specifically, the next element to be decoded may be determined according to the decoding order specified in the video decoding standard.

[0015] In combination with the first aspect, in some implementations, the method is applied to a video decoder, which includes: an advance calculation module, a control module, and an entropy decoding calculation module; and the control module obtains multiple syntax elements in the image to be decoded; the entropy decoding calculation module decodes the first syntax element; the advance calculation module predicts N next syntax elements to be decoded corresponding to N decoding results in the multiple syntax elements, and a context model corresponding to each syntax element in the N next syntax elements to be decoded during the decoding of the first syntax element; and the entropy decoding calculation module decodes the second syntax element based on the context model corresponding to the second syntax element in the N next syntax elements to be decoded that corresponds to the first decoding result when the decoding result of the first syntax element is the first decoding result among the N decoding results.

[0016] In the above scheme, the above method can be implemented by a decoder. The decoder includes an advance calculation module that can calculate the context model of the next syntax element that may be decoded in advance when decoding the current syntax element, thereby improving the efficiency of video decoding.

[0017] In combination with the first aspect, in some implementations, the video decoder also includes: a context model calculation module, and the process of decoding the first syntax element includes: the context model calculation module determines the context model of the first syntax element; and the entropy decoding calculation module decodes the first syntax element based on the context model of the first syntax element.

[0018] In the above scheme, the advance calculation module can predict the context model of the next syntax element to be decoded when the context model or entropy decoding is determined for the first syntax element, thereby improving the efficiency of video decoding.

[0019] In a second aspect, an embodiment of the present application provides a chip, which includes a programmable logic circuit and / or program instructions, and when the chip is running, the chip implements the above-mentioned first aspect and any one of the methods provided by various possible implementations of the above-mentioned first aspect.

[0020] In a third aspect, an embodiment of the present application provides a readable medium, which contains instructions. When the instructions are executed by a processor of an electronic device, the electronic device implements any one of the methods provided by the first aspect and various possible implementations of the first aspect.

[0021] In a fourth aspect, an embodiment of the present application provides an electronic device, comprising: a memory for storing instructions executed by one or more processors of the electronic device; and a processor, which is one of the processors of the electronic device, for running instructions to enable the electronic device to implement the above-mentioned first aspect and any one of the methods provided by various possible implementations of the above-mentioned first aspect.

[0022] In a fifth aspect, an embodiment of the present application provides a computer program product, which includes instructions. When the instructions are executed by an electronic device, the electronic device implements any one of the methods provided by the first aspect and various possible implementations of the first aspect. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] Figure 1 According to some embodiments of the present application, a schematic diagram of an application scenario of video decoding is shown;

[0024] Figure 2A According to some embodiments of the present application, a schematic diagram of video encoding traversal of pixels is shown;

[0025] Figure 2B According to some embodiments of the present application, a schematic diagram of video decoding traversing pixel points is shown;

[0026] Figure 3A According to some embodiments of the present application, a schematic diagram of a video decoding system is shown;

[0027] Figure 3B According to some embodiments of the present application, a schematic diagram of a video decoding syntax element is shown;

[0028] Figure 4 According to some embodiments of the present application, a code schematic diagram of a video decoding method is shown;

[0029] Figure 5 According to some embodiments of the present application, a schematic diagram of predicting the next decoded syntax element is shown;

[0030] Figure 6 According to some embodiments of the present application, a schematic diagram of another video decoding system is shown;

[0031] Figure 7 According to some embodiments of the present application, a schematic flow chart of a video decoding method is shown;

[0032] Figure 8 According to some embodiments of the present application, a flowchart of another video decoding method is shown;

[0033] Fig. 9 According to some embodiments of the present application, a timing diagram of a video decoding method is shown;

[0034] Fig.10 According to some embodiments of the present application, a schematic structural diagram of an electronic device is shown. DETAILED DESCRIPTION

[0035] The illustrative embodiments of the present application include, but are not limited to, video decoding methods, chips, media, products, and electronic devices.

[0036] The following first introduces the application scenarios of the video decoding method provided by this application.

[0037] The video decoding method of the present application can be applied to scenarios where audio and video data decoding is required. For example, the solution of the present application can be applied to panoramic sound movies, ultra-high-definition television, Internet broadband audio and video services, digital audio and video broadcasting, wireless broadband multimedia communications, virtual reality and augmented reality, and video surveillance. The following is an example of the video decoding process.

[0038] The video decoding method of the present application is specifically applied to the electronic device 10, which can obtain the encoded video data and decode the encoded video data. It can be understood that since the video is composed of frames of images, decoding the video is actually decoding the image.

[0039] For example, Figure 1 A video encoding scene graph is shown. Figure 1 The scenario includes: an electronic device 10 and an electronic device 20. The electronic device 10 and the electronic device 20 may be connected via one or more networks.

[0040] The electronic device 20 can encode the video to obtain encoded video data, specifically a binary code stream. The electronic device 20 can send the encoded video data to the electronic device 10, and the electronic device 10 can decode the encoded video data to obtain decoded video data. For example, the electronic device 10 can also play the decoded video data. It can be understood that the electronic device 20 encodes the video, and the amount of the encoded video data is small, which can greatly reduce the transmission time of the video data between electronic devices.

[0041] In some embodiments, the electronic device 10 or the electronic device 20 may include but is not limited to a smart phone, a vehicle-mounted device, a personal computer, an artificial intelligence device, a tablet computer, a personal digital assistant, a smart wearable device (such as a smart watch or bracelet, smart glasses), a smart TV (or a smart big screen, a smart screen, or a large-screen TV, etc.), a virtual reality / mixed reality / augmented display device, a server, etc. Alternatively, the electronic device 10 and the electronic device 20 may also be a physical server or a cloud device, such as an ARM server, etc., or a virtual machine (VM) based on a general physical server combined with network function virtualization technology. A virtual machine refers to a complete computer system with complete hardware system functions simulated by software and running in a completely isolated environment. This application does not impose any restrictions on the specific types of the electronic device 10 and the electronic device 20.

[0042] The following is an introduction to the video encoding and decoding process based on the context model involved in this application. Figure 1 The application scenario shown is taken as an example for illustration.

[0043] First, the encoding process based on the context model is introduced. As mentioned above, the electronic device 20 encodes each pixel in the image in a preset order based on the context model. Figure 2A As shown, Figure 2A Taking the image containing 8*8 pixels as an example, the encoding order is as shown by the arrows, first encoding pixel 0, then encoding pixel 1-8, then encoding pixel 16-9-2, ..., and finally encoding pixel 63. It should be understood that 2A is only an example of a pixel traversal method, and other traversal methods can also be used in some implementations.

[0044] Before encoding each pixel, information of the pixel can be extracted through intra-frame prediction, inter-frame prediction, motion estimation, motion compensation, etc., and the information of the pixel is represented by multiple syntax elements. Then, the multiple syntax elements are binarized to obtain binary bits (bins).

[0045] It should be noted that each pixel can be represented by multiple syntax elements, and different syntax elements are used to represent different information of the pixel, such as the prediction type and quantization parameter of the pixel. For example, the syntax elements may include the flag bit (ibc_cu_flag) of the intra block copy prediction mode (IBC), the inter prediction mode flag bit, the intra string copy prediction mode (ISC) flag bit, etc. When the flag bit of a certain mode is 1, it indicates that the prediction mode is used when processing the pixel; when the flag bit of the mode is 0, it indicates that the prediction mode is not used when processing the pixel.

[0046] Furthermore, the multiple syntax elements of the pixel point also include relevant parameters of each mode, for example, the syntax elements related to IBC include the adaptive block vector precision enable flag (abvr_enable_flag), the vector precision index (abvr_index), the vector horizontal component difference absolute value (mv_diff_x_abs_bv), etc. When the IBC flag is 1, the IBC mode is used for prediction, and other IBC-related syntax elements (such as abvr_enable_flag) have practical significance. On the contrary, the IBC flag is 0, that is, the IBC mode is not used for prediction, and the values ​​of other IBC-related syntax elements (such as abvr_enable_flag) have no practical significance.

[0047] The syntax elements can be encoded based on arithmetic coding, that is, the syntax elements are represented as an interval according to the probability of 0 and 1 contained in the values ​​of the syntax elements, and then the interval is converted into a binary codeword. In order to improve the efficiency of encoding, the video coding protocol also defines multiple context models for different syntax elements according to the possible values ​​of each syntax element, where the context model is specifically a probability model, which specifies the initial value probability of 0 and 1 in the syntax element, that is, the context model is used to estimate the probability of the syntax element.

[0048] That is to say, for each different value of each syntax element, there is a corresponding context model. Each model has a corresponding context number (Ctxldx), and the context model corresponding to the syntax element can be determined by looking up the table according to the value of the syntax element. For example, the audio video coding standard (AVS) specifies the corresponding context model for each possible parameter value of each syntax element, and a total of 399 context models are defined.

[0049] Encoding the pixel to be encoded, specifically encoding each syntax element to be encoded of the pixel to be encoded, and selecting the context model corresponding to the syntax element to be encoded from multiple context models through the values ​​of the same type of syntax elements in neighboring pixels. This process can also be called context modeling.

[0050] For example, the context model of the current syntax element to be encoded may be determined by using the syntax elements of five neighboring pixels at preset positions around the current pixel to be encoded. Figure 2A As shown, when encoding pixel 19, information of pixel 20, pixel 21, pixel 27, pixel 28, and pixel 35 (hereinafter collectively referred to as neighboring pixels of pixel 19) can be used. For example, the syntax elements of the pixel include four types: A, B, C, and D. When encoding the data of syntax element A of pixel 19, it is necessary to determine the corresponding context model according to the value of syntax element A of neighboring pixels of pixel 19. Similarly, when encoding the data of syntax element B of pixel 19, it is necessary to determine the corresponding context model according to the value of syntax element B of neighboring pixels of pixel 19.

[0051] Finally, the bin value of the syntax element to be encoded and the assigned context model are input into the binary arithmetic encoder to obtain the encoded bin value. In addition, the encoded bin value is fed back to the context model to complete the parameter update of the context model. For the next syntax element that selects the same context model, the updated context model will be used for encoding. Among them, the parameters of the context model may include: most probable signal (MPS), least probable signal (LPS), MPS represents the most likely value of the syntax element, LPS represents the least likely value of the syntax element, and then, after encoding, the values ​​of MPS and LPS in the context model can be updated according to the value of the syntax element to be encoded.

[0052] The decoding process based on the context model is described below. After obtaining the encoded image data, that is, the data to be decoded, the electronic device 10 can decode it in a preset decoding order. For example, decoding in the reverse order of the encoding order, such as Figure 2B As shown, the decoding method is performed as shown by the arrows in the figure, first decoding pixel 63, then decoding pixel 62 and pixel 55 in sequence, then decoding pixel 47, pixel 54, pixel 61, ..., and finally decoding pixel 0.

[0053] For the decoding process of each pixel, please refer to Figure 3A The decoding interaction diagram shown in Figure 3AAs shown, the decoding process may include a context model calculation module 301 , a control module 302 and an entropy decoding calculation module 303 .

[0054] The context model calculation module 301 is used to determine the context model to be used when decoding each syntax element in the pixel to be decoded. Specifically, based on the previously decoded information of multiple neighboring pixels at preset positions around the element to be decoded, such as the values ​​of the syntax elements corresponding to the neighboring pixels, the context model obtained by looking up the values ​​in the table is determined as the context model of the syntax element corresponding to the current pixel. For example, for Figure 2B The decoding of the syntax element A of pixel point 19 can be carried out by looking up the value of the syntax element A in the neighboring pixels of pixel point 19, obtaining the corresponding context model, and determining the context model as the context model corresponding to the syntax element A of pixel point 19.

[0055] It should be understood that the neighboring pixels corresponding to the pixel to be decoded during decoding are consistent with the neighboring pixels corresponding to the pixel to be decoded during encoding, and the context model used for the same syntax element of the pixel to be decoded during decoding is consistent with the context model used during encoding.

[0056] The context model calculation module 301 is also used to input the syntax elements of the pixel points to be decoded and the corresponding context model into the entropy decoding calculation module 303, for example, input them into a multiplexer (Mux) and then input them into the entropy decoding calculation module 303.

[0057] For example, when the element to be decoded corresponding to the current pixel point X is X0, the context model calculation module 301 first determines the context model of X0, records X0 and its corresponding context model as ctx_X0, and inputs ctx_X0 to the entropy decoding calculation module 303 to obtain the decoding result of X0. The entropy decoding calculation module 303 then returns the decoding result to the control module 302, and the control module 302 controls Mux to input the next element to be decoded to the entropy decoding calculation module 303, and updates the parameters of the context model corresponding to ctx_X0 according to the decoding result of ctx_X0.

[0058] Specifically, the control module 302 can determine whether the decoding result of ctx_X0 meets the preset condition to determine the next element to be decoded. For example, when X0 is the flag bit (ibc_cu_flag) of IBC, the preset condition is whether the decoding result of X0 is 1. If the decoding result of X0 is 1, other syntax elements of IBC (such as X1) can be decoded. Figure 3BAs shown, if the decoding result of ctx_X0 is equal to 1, the control module 302 will determine that the next element to be decoded is X1. The context model calculation module 301 will determine the context model corresponding to X1, and then input X1 and its corresponding context model into the entropy decoding calculation module 303.

[0059] When the decoding result of X0 is 0, other IBC-related syntax elements (such as abvr_enable_flag, abvr_index, etc.) have no practical meaning, and other IBC-related syntax elements may not be decoded. Furthermore, the control module 302 may determine that the next element to be decoded is the other syntax elements following the IBC-related syntax elements. When the IBC-related syntax elements are the last undecoded syntax elements of the current pixel, the control module 302 may also control the next element to be decoded to be the first syntax element of the next pixel. For example, if the decoding result of ctx_X0 is equal to 0, the control module 302 will end the decoding of the pixel X and determine that the next decoded element to be decoded is the element Y0 to be decoded of the next pixel Y. The context model calculation module 301 will determine the context model corresponding to Y0, and then input Y0 and its corresponding context model into the entropy decoding calculation module 303.

[0060] The above decoding process can also be done as follows Figure 4 The code shown is implemented. For example, the IBC flag is represented as A, the vector precision flag is represented as B, the vector precision index is represented as C, and the absolute value of the vector horizontal component difference is represented as D. The data after the above elements to be decoded and the corresponding context model are represented as ctx_A, ctx_B, ctx_C, and ctx_D.

[0061] like Figure 4 As shown, i is the pixel number, Max_Scan is the total number of pixels, for example, Figure 2B , Max_Scan is 64. For the i-th pixel, the entropy decoding calculation module 303 first decodes the to-be-decoded element ctx_A of the i-th pixel, for example, inputs ctx_A into the decode_one_bit() function for decoding, and obtains the decoding result of A.

[0062] If the decoding result of A is 0, the context model parameters corresponding to ctx_A to ctx_D are updated, for example, by executing the update_ctx() function, and then i is increased by 1, and the control module 302 controls Mux to input the element to be decoded of the next pixel point into the entropy decoding calculation module 303.

[0063] If the decoding result of A is 1, ctx_B will continue to be decoded. Similarly, if the decoding result of B is 1, ctx_C and ctx_D will continue to be decoded. Otherwise, the context model parameters corresponding to ctx_A to ctx_D are updated, and the control module 302 will control Mux to input the element to be decoded of the next pixel point into the entropy decoding calculation module 303.

[0064] In summary, since decoding a pixel requires using the information of neighboring pixels to determine the context model of the current pixel to be decoded, it is necessary to decode one pixel before determining the next pixel to be decoded and its syntax elements. Then, the context model required to decode the next pixel to be decoded is determined based on the syntax elements of the next pixel to be decoded, and the next pixel to be decoded is decoded based on the determined context model. In this way, video decoding can only decode pixels and each element to be decoded in sequence, resulting in low video decoding efficiency.

[0065] In order to solve the problem of low video decoding efficiency, the present application provides a video decoding method, which can be applied to, for example, a video decoder in the aforementioned electronic device 10. In the process of decoding a first syntax element, the electronic device 10 can predict a context model corresponding to at least one syntax element decoded after the first syntax element based on a value set of the first syntax element. After obtaining the decoding result of the first syntax element, a second syntax element corresponding to the decoding result of the first syntax element can be selected from the at least one syntax element, and the second syntax element can be decoded based on the predicted context model corresponding to the second syntax element.

[0066] For example, Figure 3B As shown, when decoding X0, the possible decoding results of X0, the next possible grammatical element to be decoded corresponding to each decoding result, and the context model corresponding to the next grammatical element to be decoded are determined in advance. For example, the decoding result of X0 may be 0 and 1. When the decoding result is 0, the corresponding next grammatical element to be decoded is Y0, and when the decoding result is 1, the corresponding next grammatical element to be decoded is X1. Furthermore, the electronic device 10 can determine in advance the context models that will be selected for the next grammatical elements Y0 and X1 to be decoded, respectively. After obtaining the actual decoding result of X0 (as an example of the first decoding result), the element corresponding to the actual decoding result can be directly selected from Y0 and X1, and the decoding calculation can be started according to the context model that has been selected in advance.

[0067] Optionally, the electronic device 10 may also predict context models of syntax elements corresponding to more decoding results. Figure 5As shown, when decoding X0, in addition to predicting the context models of X1 and Y0, the context model of the next decoded element corresponding to the different decoding results of X1 and Y0 can be further predicted, for example, predicting X2, Y1, and the context model of the to-be-decoded element Z0 of the next pixel point Z of the pixel point Y in the traversal order.

[0068] It should be understood that the first syntax element may be a syntax element of a first pixel among multiple pixels, the second syntax element may be a syntax element of the first pixel whose decoding order is after the first syntax element, or the second syntax element may be a syntax element of a second pixel among multiple pixels. Figure 3B Only when the syntax element value is 0, the next decoded syntax element is the first syntax element of the next pixel. In some embodiments, when the syntax element value is 0, the next decoded syntax element may be other syntax elements of the same pixel. For example, if the IBC flag is 0, the decoding of IBC-related syntax elements will be skipped, but the next decoded syntax element may be a flag corresponding to another prediction model in the same pixel (for example, an ISC flag). Alternatively, the syntax element value does not affect the selection of the next syntax element to be decoded, for example Figure 4 In the code shown, after the syntax element C is decoded, no matter what the decoding result of C is, the next decoded syntax element is D.

[0069] It should be understood that the video decoding method provided in this application can be applied to videos encoded by AVS, and can also be applied to videos encoded by the universal video coding (H.266 / VVC) standard, the high-efficiency video compression coding (H.265 / HEVC) standard, etc. The above syntax elements are syntax elements specified by each protocol. This application does not make specific restrictions on this.

[0070] Furthermore, there is no need to wait for the selection result of the context model of the next element to be decoded after determining the decoding result of the element to be decoded. The next element to be decoded can be directly decoded according to the context model determined in advance, thereby improving the video decoding efficiency.

[0071] The following is an introduction to a video decoding system provided by the user. The video decoding system may be a video decoder. Figure 6 As shown, the video decoding system includes a context model calculation module 601, a control module 602, an entropy decoding calculation module 603 and an advance calculation module 604, Mux1 and Mux2.

[0072] The context model calculation module 601 is used to determine the context model to be used when decoding a syntax element (eg, the first syntax element), and send the context model of the first syntax element to Mux1. For details, please refer to the description of the context model calculation module 301 above.

[0073] The control module 602 is used to obtain the syntax elements of the current image to be decoded, and control Mux1 to input the next syntax element to be decoded and its corresponding context model to Mux2 according to the decoding result of the syntax element, so that the entropy decoding calculation module 303 can decode the next syntax element. For details, please refer to the description of the aforementioned control module 302.

[0074] Furthermore, the control module 602 is further configured to send the predicted at least one next syntax element to be decoded to the advance calculation module 604, where the next syntax element to be decoded is calculated based on the possible decoding result of the first syntax element currently being decoded. Figure 5 The next syntax element to be decoded corresponding to X0 shown may include X1 and Y0, or may also include X2, Y1 and Z0. For details, please refer to the aforementioned Figure 5 Related description.

[0075] In some embodiments, the control module 602 may send all the next syntax elements to be decoded corresponding to all the decoding results that may exist for the first syntax element to the advance calculation module 604. Further, it can be ensured that no matter what the decoding result of the current element to be decoded is, the entropy decoding calculation module 603 can directly obtain the context model corresponding to the element determined in advance by the advance calculation module 604 from Mux2.

[0076] In other embodiments, the control module 602 may also predict the possible decoding results of the current element to be decoded, and send the next syntax element to be decoded corresponding to the plurality of decoding results with the largest predicted probability to the advance calculation module 604. For example, the value with the largest value ratio of the syntax element in the decoded pixels is used as the possible decoding result of the current element to be decoded. Thus, the amount of calculation of the advance calculation module 604 can be reduced.

[0077] The advance calculation module 604 is used to calculate multiple context models of the next syntax element to be decoded during the decoding of the first syntax element according to the next syntax element to be decoded sent by the control module 602, and send the next syntax element to be decoded and its context model to Mux2.

[0078] Furthermore, after determining that the decoding result of the current first syntax element is the first decoding result, the control module 602 can determine, based on the first decoding result, that the next syntax element to be decoded is the second syntax element, and send the information of the second syntax element to Mux2, which directly sends the context model of the second syntax element calculated in advance by the advance calculation module 604 to the entropy decoding calculation module 303.

[0079] Alternatively, the entropy decoding calculation module 603 may also determine that the next syntax element to be decoded is the second syntax element according to the decoding result, and the entropy decoding calculation module 603 directly obtains the second syntax element and its context model from Mux2 through the fast path. Therefore, the entropy decoding calculation module 603 does not need to wait for the context model decoding result of the second syntax element, thereby improving the video decoding efficiency.

[0080] For example, the above Figure 3B Taking the pixel point X and pixel point Y shown in the figure as an example, after the context model calculation module 601 obtains the context model corresponding to X0, it is input to the entropy decoding calculation module 603 through Mux1 and Mux2. In this process, the control module 602 can also predict the decoding result of X0 to obtain the next element to be decoded corresponding to each decoding result, for example, the next syntax element to be decoded for X0 includes Y0 and X1. Then, the control module 602 can send the next syntax element to be decoded Y0 and X1 to the advance calculation module 604, and the advance calculation module 604 determines the context model corresponding to the next syntax element to be decoded Y0 and X1.

[0081] Then, after the entropy decoding calculation module 603 calculates the decoding result of X0, the next syntax element to be decoded and its context model corresponding to the decoding result are sent to the entropy decoding calculation module 603 through the fast path control Mux2. For example, when the decoding result of X0 is 0, the entropy decoding calculation module 603 can control Mux2 to send Y0 and its context model to the entropy decoding calculation module 603.

[0082] In some embodiments, the control module 602 can also predict the probability of the decoding result of X0, and determine the possible decoding result of X0. For example, the control module 602 can determine the most likely decoding result of X0 based on the values ​​of the syntax elements of the same type as X0 in the decoded pixel points. For example, if 90% of the values ​​of the syntax elements of the same type as X0 in the neighboring pixels are 0 and 10% are 1, it can be determined that the probability of X0 being 0 is the highest. Furthermore, the control module 602 can send the next syntax element Y0 to be decoded corresponding to the decoding result of 0 to the advance calculation module 604, and the advance calculation module 604 calculates the context model corresponding to Y0. When the entropy decoding calculation module 603 determines that X0 is 0, Y0 can be directly decoded according to the context model of Y0 calculated in advance.

[0083] In some other embodiments, the context model of the first syntax element may also be calculated in advance by the advance calculation module 604 when calculating other syntax elements.

[0084] It should be understood that if the decoding result of the current element received by the control module 602 is not the predicted decoding result, that is, the advance calculation module 604 has not calculated the context model of the next element to be decoded in advance, the context model calculation module 601 is still needed to determine the context model of the next element to be decoded, and then input it to the entropy decoding calculation module 603 through Mux1 and Mux2 for decoding.

[0085] Furthermore, the video encoder chip obtained through the structural design of the above-mentioned video encoder can achieve the goal of not having to wait for the selection result of the context model of the next element to be decoded after determining the decoding result of the element to be decoded. The next element to be decoded can be directly decoded according to the context model determined in advance, thereby improving the video decoding efficiency.

[0086] The following is an introduction to the process of the video decoding method provided by the present application. The method can be applied to the above-mentioned video decoding system, such as Figure 7 As shown, the steps of the method include:

[0087] S701: The context model calculation module 601 determines a context model of a first grammatical element.

[0088] The first syntax element is a syntax element in the pixel to be decoded, and the context model calculation module 601 can determine the context model for the first syntax element according to the values ​​of syntax elements of the same type as the first syntax element in the neighboring pixels of the pixel to be decoded. Figure 2B and Figure 3A The relevant description will not be repeated here.

[0089] S702: The context model calculation module 601 sends the first syntax element and its context model to the entropy decoding calculation module 603.

[0090] S703: The entropy decoding calculation module 603 decodes the first syntax element to determine a decoding result of the first syntax element.

[0091] The entropy decoding calculation module 603 decodes the first syntax element using the context model corresponding to the first syntax element. For details, please refer to the aforementioned Figure 3A or Figure 6 The relevant description will not be repeated here.

[0092] S704: The control module 602 determines at least one next syntax element to be decoded according to the value range of the first syntax element.

[0093] In the process of decoding the first syntax element, that is, step S701 to step S703, the control module 602 can predict the decoding result of the first syntax element in advance, for example, for the IBC flag, the possible value is 0 or 1. Then, the control module 602 can determine the N next syntax elements to be calculated based on the N decoding results of the first syntax element, where N is an integer greater than 0. It should be understood that each decoding result has a corresponding next syntax element to be decoded. Among them, there may be multiple decoding results corresponding to the same syntax element to be decoded, for example, the aforementioned Figure 4 As shown in the code, the next syntax element to be decoded corresponding to multiple decoding results of syntax element C is D.

[0094] In some embodiments, the control module 602 may determine all possible decoding results of the first syntax element, and determine the next syntax element to be decoded corresponding to all the decoding results.

[0095] In some other embodiments, the control module 602 may also predict possible decoding results of the current first syntax element, and only determine syntax elements corresponding to several decoding results with the largest predicted probabilities as the next syntax elements to be decoded.

[0096] In some embodiments, the control module 602 may further predict the syntax element corresponding to the decoding result of the next syntax element (as M decoding results, M is an integer greater than 0) (as an instance of the M next syntax elements to be decoded), for example, as described above. Figure 5 The next syntax element to be decoded corresponding to X0 shown may include X1 and Y0, or may also include X2, Y1 and Z0. For details, please refer to the aforementioned Figure 5 Related description.

[0097] Specifically, please refer to the aforementioned Figure 6 Related descriptions of the control module 602 and the advance calculation module 604.

[0098] S705: The control module 602 sends the next syntax element to be decoded to the advance calculation module 604.

[0099] S706: The look-ahead calculation module 604 determines a context model of the next syntax element to be decoded.

[0100] The advance calculation module 604 can determine the context model of the next syntax element to be decoded based on the information of the neighboring pixels corresponding to the next syntax element to be decoded. The advance calculation module 604 also stores the next syntax element to be decoded and its context model for subsequent decoding. Figure 6 The relevant description of the advance calculation module 604 is not repeated here.

[0101] In some embodiments, steps S701 to S703 and steps S704 to S706 may be executed synchronously.

[0102] S707: The entropy decoding calculation module 603 sends the decoding result of the first syntax element to the control module 602.

[0103] S708: The control module 602 determines a second syntax element.

[0104] The control module 602 can determine the next syntax element to be decoded, that is, the second syntax element, according to the decoding result of the first syntax element. Figure 3B For example, when the decoding result of X0 is 0, the next syntax element to be decoded is Y0. When the decoding result of X0 is 1, the next syntax element to be decoded is X0.

[0105] S709 : The control module 602 sends the second syntax element to the advance calculation module 604 .

[0106] The control module 602 may send the determined second syntax element to the advance calculation module 604 , and the advance calculation module 604 may send the context model of the second syntax element calculated in advance to the entropy decoding calculation module 603 .

[0107] S710: The advance calculation module 604 sends the second syntax element and its context model to the entropy decoding calculation module 603.

[0108] In some embodiments, the advance calculation module 604 may also send the calculated context model of the second syntax element to a multiplexer, such as Mux2. After determining the second syntax element, the control module 602 may send the second syntax element to Mux2, for example, through Mux1. Then Mux2 sends the second syntax element and its context model to the entropy decoding calculation module 603.

[0109] In some other embodiments, the entropy decoding calculation module 603 may also determine the second syntax element after calculating the decoding result of the first syntax element. The entropy decoding calculation module 603 obtains the second syntax element and its context model from the advance calculation module 604 or Mux2.

[0110] S711: The entropy decoding calculation module 603 decodes the second syntax element.

[0111] In summary, through the video decoding method provided by the present application, the entropy decoding calculation module 603 does not need to wait for the selection result of the context model of the next element to be decoded after determining the decoding result of the element to be decoded. It can directly decode the next element to be decoded according to the context model determined in advance, thereby improving the video decoding efficiency.

[0112] The following is an introduction to the process of the video decoding method provided by the present application. The method can be applied to the above-mentioned electronic device 10, such as Figure 8 As shown, the steps of the method include:

[0113] S801: According to N decoding results corresponding to a first syntax element, determine corresponding N next syntax elements to be decoded and their context models.

[0114] The electronic device 10 may determine the corresponding N next syntax elements to be decoded in advance according to the possible values ​​of the first syntax element currently being decoded, that is, N decoding results. Among them, the possible values ​​of the first syntax element are related to the syntax element type of the first syntax element. For example, the value of the IBC flag may be 0 or 1. It should be understood that each decoding result has a corresponding next syntax element to be decoded. Among them, there may be multiple decoding results corresponding to the same syntax element to be decoded.

[0115] In some embodiments, the electronic device 10 may determine all possible decoding results of the first syntax element, and determine the syntax elements corresponding to all the decoding results as the N next syntax elements to be decoded.

[0116] In some other embodiments, the electronic device 10 may also predict possible decoding results of the current first syntax element, and only use the syntax element corresponding to the decoding result with the highest prediction probability as the N next syntax elements to be decoded.

[0117] In some embodiments, the electronic device 10 may also predict the decoding results of multiple syntax elements that may be decoded next, that is, M decoding results, and determine the M syntax elements to be decoded next corresponding to the M decoding results.

[0118] Furthermore, the electronic device 10 can determine the context models corresponding to the M next syntax elements to be decoded based on the information of the neighboring pixels of the M next syntax elements to be decoded. The electronic device 10 can also store the M next syntax elements to be decoded and their corresponding context models for subsequent decoding. Figure 6 The relevant description of the advance calculation module 604 is not repeated here.

[0119] S802: Decode a first syntax element to obtain a first decoding result.

[0120] After the electronic device 10 obtains the image to be decoded, it can obtain multiple syntax elements in the image to be decoded, and then traverse the pixels in the image to be decoded according to a preset order. For example, Figure 2B The electronic device 10 sequentially decodes the syntax elements in the pixels to be decoded corresponding to the preset order, specifically including determining a context model for the first syntax element based on the syntax elements of the neighboring pixels of the first syntax element. Figure 3A and Figure 3B The relevant description of is not repeated here. Then, the first syntax element is decoded using the context model corresponding to the first syntax element. For details, please refer to the aforementioned Figure 3A or Figure 6 The relevant description will not be repeated here.

[0121] It should be understood that the electronic device 10 may first execute step S801 and then execute step S802. Alternatively, step S801 and step S802 may be executed simultaneously.

[0122] S803: Determine a second syntax element corresponding to the first decoding result from the N next syntax elements to be decoded.

[0123] The electronic device 10 can determine the next element to be decoded (i.e., the second syntax element) corresponding to the actual decoding result according to the decoding result of the first syntax element obtained by actual decoding, and then determine the context model corresponding to the second syntax element from the context models of the M next syntax elements to be decoded that are calculated in advance. Figure 6 The relevant description of the entropy decoding calculation module 603 is not repeated here.

[0124] S804: Based on the second syntax element and the corresponding context model, decode the second syntax element to obtain a second decoding result.

[0125] The electronic device 10 decodes the second syntax element according to the second syntax element and the second context model to obtain a decoding result of the second syntax element.

[0126] It should be understood that, while decoding the second syntax element, the electronic device 10 may also predict the decoding result of the second syntax element to determine the syntax element that may be decoded next.

[0127] Furthermore, through the video decoding method provided by the present application, there is no need to wait for the selection result of the context model of the next element to be decoded after determining the decoding result of the element to be decoded. The next element to be decoded can be directly decoded according to the context model determined in advance, thereby improving the video decoding efficiency.

[0128] In summary, through the video decoding method provided by this application, the context model of the next element to be decoded can be calculated in advance, thereby improving the video decoding efficiency. Figure 6 As shown, the entropy decoding module 603 can directly decode the next element to be decoded through a fast path after calculating the previous element to be decoded. The advance calculation module 604 has determined the context model of the next element to be decoded in advance. Therefore, the entropy decoding module 603 does not need to wait to determine the context model of the next element to be decoded.

[0129] For example, the decoding element to be decoded is A. The current video decoding process (eg Fig. 9Normal single bin in the decoded element A, it is necessary to first perform context modeling (i.e., CTX_A) on the decoded element A, then perform entropy decoding (i.e., BAD_A) on the decoded element A according to the context model, and then cache the decoded result of the decoded element A (i.e., BNR_A). If the decoding result of the decoded element A corresponds to the next element to be decoded B, similarly, CTX_B, BAD_B, and BNR_B need to be performed. If the decoding result of the decoded element B corresponds to the next element to be decoded C, similarly, CTX_C, BAD_C, and BNR_C need to be performed.

[0130] However, in the video decoding method provided in this application, reference Fig. 9 The fast path CTX (Fast Path CTX), Fast Path BAD, and Fast Path BNR in it. After context modeling of element A to be decoded (i.e., CTX_A), context modeling is performed on the next possible element to be decoded, including context modeling of element B to be decoded (i.e., CTX_B), and entropy decoding is performed on element A to be decoded (i.e., BAD_A). When the decoding result of element A to be decoded is obtained and cached (BNR_A), it can be determined that the next possible element to be decoded is B according to the decoding result of element A to be decoded, and entropy decoding is performed on element B to be decoded (i.e., BAD_B). Similarly, in the BAD_B process, context modeling (i.e., CTX_C) can be performed on element C to be decoded at the same time, and when the decoding result of element B to be decoded is cached (BNR_B), element C to be decoded can be entropy decoded (i.e., BAD_C).

[0131] In this way, the decoding result of the current clock cycle can directly act on the decoding input of the next beat, and the entropy decoding calculation can be run uninterruptedly, such as Fig. 9 As shown in the figure, the Fast Path CTX / BAD / BNR is pipelined. Fig. 9 The 3clk / bit is improved to about 1clk / bit. Furthermore, for video streams with a high proportion of residual data, such as images with 90% residual data, the decoding efficiency can be improved by more than 2 times through this application. In addition, the time from the entropy decoding calculation module 603 to the decoding result cache is equivalent to the time to obtain the decoding input through the fast path, which means that the fast prefetch mechanism has higher performance than the conventional design while ensuring that the circuit timing is met.

[0132] further, Fig.10 According to some embodiments of the present application, a schematic diagram of the structure of an electronic device 10 is shown. Fig.10As shown, the electronic device 10 includes one or more processors 101A, NPU 101B, system memory 102, non-volatile memory (NVM) 103, communication interface 104, input / output (I / O) device 105, and system control logic 106 for coupling the processor 101A, system memory 102, non-volatile memory 103, communication interface 104 and input / output (I / O) device 105. Among them:

[0133] Processor 101A may include one or more processing units, for example, a central processing unit (CPU), a graphics processing unit (GPU), a digital signal processor (DSP), a microprocessor (MCU), an artificial intelligence (AI) processor, or a processing module or processing circuit of a programmable logic device (field programmable gate array, FPGA) may include one or more single-core or multi-core processors.

[0134] The neural network processor 101B can be used to implement the reasoning of the neural network model and to run the instructions corresponding to the operation method of the neural network model provided in the embodiment of the present application. The neural network processor 101B can be an independent processor or integrated into the processor 101A.

[0135] The system memory 102 is specifically a volatile memory, such as a random-access memory (RAM), a double data rate synchronous dynamic random access memory (DDR SDRAM), etc. The system memory is used to temporarily store data and / or instructions. For example, in some embodiments, the system memory 102 can be used to store relevant instructions of the above-mentioned video decoding method.

[0136] The non-volatile memory 103 may include one or more tangible, non-transitory computer-readable media for storing data and / or instructions. In some embodiments, the non-volatile memory 103 may include any suitable non-volatile memory such as a flash memory and / or any suitable non-volatile storage device, such as a hard disk drive (HDD), a compact disc (CD), a digital versatile disc (DVD), a solid-state drive (SSD), etc. In some embodiments, the non-volatile memory 103 may also be a removable storage medium, such as a secure digital (SD) memory card, etc.

[0137] In particular, the system memory 102 and the non-volatile memory 103 may respectively include: a temporary copy and a permanent copy of the instruction 107. The instruction 107 may include: when executed by at least one of the processor 101A and / or the neural network processor 101B, the electronic device 10 implements the video decoding method provided in each embodiment of the present application, for details, please refer to Figure 6 and Figure 7 and its related description.

[0138] The communication interface 104 may include a transceiver for providing a wired or wireless communication interface for the electronic device 10, and then communicating with any other suitable device through one or more networks. In some embodiments, the communication interface 104 may be integrated into other components of the electronic device 10, for example, the communication interface 104 may be integrated into the processor 101A. In some embodiments, the electronic device 10 may communicate with other devices through the communication interface 104, for example, the electronic device 10 may obtain a neural network model to be run from other electronic devices through the communication interface 104.

[0139] The input / output (I / O) device 105 may include input devices such as a keyboard, a mouse, etc., and output devices such as a display, etc. A user may interact with the electronic device 10 via the input / output (I / O) device 105 .

[0140] System control logic 106 may include any suitable interface controller to provide any suitable interface with other modules of electronic device 10. For example, in some embodiments, system control logic 106 may include one or more memory controllers to provide interfaces to system memory 102 and non-volatile memory 103.

[0141] In some embodiments, at least one of the processors 101A may be packaged together with the logic of one or more controllers for the system control logic 106 to form a system in package (SiP). In other embodiments, at least one of the processors 101A may also be integrated with the logic of one or more controllers for the system control logic 106 on the same chip to form a system-on-chip (SoC).

[0142] It can be understood that the electronic device 10 can be any electronic device that can run a neural network model, including but not limited to mobile phones, wearable devices (such as smart watches, etc.), tablet computers, desktops, laptops, handheld computers, notebook computers, ultra-mobile personal computers (ultra-mobile personal computers, UMPC), netbooks, as well as cellular phones, personal digital assistants (personal digital assistants, PDA), augmented reality (augmented reality, AR) / virtual reality (virtual reality, VR) devices, etc., and the embodiments of the present application are not limited thereto.

[0143] Understandably, Fig.10 The structure of the electronic device 10 shown is only an example. In other embodiments, the electronic device 10 may include more or fewer components than shown, or combine some components, or separate some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.

[0144] The various embodiments of the mechanism disclosed in the present application can be implemented in hardware, software, firmware or a combination of these implementation methods. The embodiments of the present application can be implemented as a computer program or program code executed on a programmable system, which includes at least one processor, a storage system (including volatile and non-volatile memory and / or storage elements), at least one input device and at least one output device.

[0145] Program code may be applied to input instructions to perform the functions described herein and to generate output information. The output information may be applied to one or more output devices in a known manner. For purposes of this application, a processing system includes any system having a processor such as, for example, a digital signal processor (DSP), a microcontroller, an application specific integrated circuit (ASIC), or a microprocessor.

[0146] Program code can be implemented with high-level programming language or object-oriented programming language to communicate with the processing system. When necessary, program code can also be implemented with assembly language or machine language. In fact, the mechanism described in this application is not limited to the scope of any specific programming language. In either case, the language can be a compiled language or an interpreted language.

[0147] The disclosed embodiments may also be implemented as instructions carried or stored on one or more temporary or non-temporary machine-readable (e.g., computer-readable) storage media, which may be read and executed by one or more processors. For example, the instructions may be distributed over a network or through other computer-readable media.

[0148] A machine-readable medium may include any mechanism for storing or transmitting information in a form readable by a machine (e.g., a computer), including but not limited to floppy disks, optical disks, optical discs, read-only memories (CD-ROMs), magneto-optical disks, read-only memories (ROM), random access memories (RAM), erasable programmable read-only memories (EPROM), electrically erasable programmable read-only memories (EEPROM), magnetic or optical cards, flash memory, or a tangible machine-readable storage for transmitting information using the Internet in the form of electrical, optical, acoustic or other propagation signals (e.g., carrier waves, infrared signals, digital signals, etc.).

[0149] Machine-readable media include any type of machine-readable media suitable for storing or transmitting electronic instructions or information in a form readable by a machine (eg, a computer).

[0150] The disclosed embodiments may also be implemented as a chip, wherein the chip includes a programmable logic circuit and / or program instructions, and when the chip is executed, the chip implements the above-mentioned video decoding method.

[0151] In the accompanying drawings, some structural or method features may be shown in a specific arrangement and / or order. However, it should be understood that such a specific arrangement and / or order may not be required. Instead, in some embodiments, these features may be arranged in a manner and / or order different from that shown in the illustrative drawings. In addition, the inclusion of structural or method features in a particular figure does not mean that such features are required in all embodiments, and in some embodiments, these features may not be included or may be combined with other features.

[0152] It should be noted that the units / modules mentioned in the various device embodiments of the present application are all logical units / modules. Physically, a logical unit / module can be a physical unit / module, or a part of a physical unit / module, or can be implemented as a combination of multiple physical units / modules. The physical implementation method of these logical units / modules themselves is not the most important. The combination of functions implemented by these logical units / modules is the key to solving the technical problems proposed by the present application. In addition, in order to highlight the innovative part of the present application, the above-mentioned device embodiments of the present application do not introduce units / modules that are not closely related to solving the technical problems proposed by the present application, which does not mean that there are no other units / modules in the above-mentioned device embodiments.

[0153] It should be noted that in the examples and description of this patent, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of more restrictions, an element defined by the sentence "comprises one" does not exclude the existence of other identical elements in the process, method, article or device including the element.

Claims

1. A video decoding method, characterized in that: The method comprises: Acquire multiple syntax elements in the to-be-decoded image, the multiple syntax elements including a first syntax element, a decoding result of the first syntax element is one of N decoding results, where N is an integer greater than 0; In a process of decoding the first syntax element, predicting N next syntax elements to be decoded corresponding to the N decoding results among the multiple syntax elements, and a context model corresponding to each syntax element among the N next syntax elements to be decoded; The decoding result corresponding to the first syntax element is the first decoding result among the N decoding results, and the second syntax element is decoded based on the context model corresponding to the second syntax element corresponding to the first decoding result among the N next syntax elements to be decoded.

2. The method according to claim 1, characterized in that The decoding result of the second syntax element is one of M decoding results, where M is an integer greater than 0, and the method further includes: In a process of decoding the first syntax element or a process of decoding the second syntax element, predicting M syntax elements to be decoded after the second syntax element corresponding to the M decoding results among the multiple syntax elements, and a context model corresponding to each of the M syntax elements to be decoded after the second syntax element; The decoding result corresponding to the second syntax element is the second decoding result among the M decoding results, and the third syntax element is decoded based on a context model corresponding to a third syntax element corresponding to the second decoding result among the M syntax elements to be decoded after the second syntax element.

3. The method according to claim 1, characterized in that: Corresponding to the image to be decoded being an image encoded by the audio and video coding standard AVS, the multiple syntax elements are syntax elements defined in the audio and video coding standard AVS; or, Corresponding to the image to be decoded being an image encoded according to the universal video coding VVC standard, the multiple syntax elements are syntax elements defined in the video coding VVC standard; or, Corresponding to the image to be decoded being an image encoded according to the High Efficiency Video Compression Coding (HEVC) standard, the multiple syntax elements are syntax elements defined in the High Efficiency Video Compression Coding (HEVC) standard.

4. The method according to claim 1, characterized in that: The context model is used to perform probability estimation on the corresponding grammatical element.

5. The method according to claim 1, characterized in that The image to be decoded includes multiple pixels, wherein the first syntax element is a syntax element of a first pixel among the multiple pixels, the second syntax element is a syntax element of the first pixel that is after the first syntax element in a decoding order, or the second syntax element is a syntax element of a second pixel among the multiple pixels.

6. The method according to claim 1, characterized in that The method is applied to a video decoder, which includes: an advance calculation module, a control module, and an entropy decoding calculation module; and The control module obtains a plurality of syntax elements in the image to be decoded; Decoding the first syntax element by the entropy decoding calculation module; The advance calculation module predicts, during the decoding process of the first syntax element, N next syntax elements to be decoded corresponding to the N decoding results among the multiple syntax elements, and a context model corresponding to each syntax element among the N next syntax elements to be decoded; And when the decoding result of the first syntax element is the first decoding result among the N decoding results, the entropy decoding calculation module decodes the second syntax element based on the context model corresponding to the second syntax element corresponding to the first decoding result among the N next syntax elements to be decoded.

7. The method according to claim 6, characterized in that The video decoder further includes: a context model calculation module, and the process of decoding the first syntax element includes: The context model calculation module determines a context model of the first grammatical element; The entropy decoding calculation module decodes the first syntax element based on a context model of the first syntax element.

8. A chip, characterized in that: The chip includes a programmable logic circuit and / or program instructions, and when the chip is running, the chip implements the video decoding method according to any one of claims 1 to 7.

9. A readable medium, characterized in that: The readable medium includes instructions, and when the instructions are executed by a processor of an electronic device, the electronic device implements the video decoding method according to any one of claims 1 to 7.

10. An electronic device, characterized in that: include: a memory for storing instructions to be executed by one or more processors of the electronic device; And a processor, which is one of the processors of the electronic device, is used to run the instructions to enable the electronic device to implement the video decoding method according to any one of claims 1 to 7.

11. A computer program product, characterized in that The computer program product comprises computer instructions, which, when executed by an electronic device, enable the electronic device to implement the video decoding method according to any one of claims 1 to 7.