Video encoding and decoding methods, apparatuses, computer-readable media and electronic devices

CN122741704APending Publication Date: 2026-09-11TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510287204.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-11
Publication Date
2026-09-11

AI Technical Summary

Technical Problem

然而,相关技术中提出的算术编码方法在概率模型估计方面存在一些局限性,这些局限性影响了编解码效率和准确性

Benefits of technology

[0013]In some embodiments of this application, the technical solutions can obtain the syntax elements of the temporally correlated blocks of the current block, and then perform context classification prediction on the syntax elements of the current block based on the syntax elements of the temporally correlated blocks to obtain the classification category corresponding to the syntax elements of the current block. Furthermore, based on the classification category corresponding to the syntax elements of the current block, the context probability model corresponding to the syntax elements of the current block can be determined, and the current block can be decoded based on the determined context probability model. It is evident that the technical solutions of this application, by introducing the syntax elements of temporally correlated blocks as context information, achieve more accurate probability estimation and context model selection, significantly improving the efficiency and accuracy of video encoding and decoding, and are particularly suitable for processing complex motion scenes and encoding and decoding high-resolution videos.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122741704A_ABST
    Figure CN122741704A_ABST
Patent Text Reader

Abstract

This application provides a video encoding / decoding method, apparatus, computer-readable medium, and electronic device. The video decoding method includes: obtaining the syntax elements of a temporally correlated block of the current block; performing context classification prediction on the syntax elements of the current block based on the syntax elements of the temporally correlated block to obtain the classification category corresponding to the syntax elements of the current block; determining the context probability model corresponding to the syntax elements of the current block based on the classification category corresponding to the syntax elements of the current block; and performing decoding processing on the current block based on the determined context probability model. The technical solution of this application can introduce the syntax elements of the temporally correlated block as context information, achieving more accurate probability estimation and context model selection, and improving the efficiency and accuracy of video encoding / decoding.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the fields of computer and communication technology, and more specifically, to a video encoding / decoding method, apparatus, computer-readable medium, and electronic device. Background Technology

[0002] In audio and video encoding and decoding technologies, arithmetic coding is a commonly used entropy coding method aimed at improving compression efficiency. Arithmetic coding primarily achieves more efficient encoding by dynamically adjusting the probability model of symbols. However, the arithmetic coding methods proposed in related technologies have some limitations in probability model estimation, which affect encoding and decoding efficiency and accuracy. Summary of the Invention

[0003] The embodiments of this application provide a video encoding / decoding method, apparatus, computer-readable medium, and electronic device, which can introduce the syntax elements of temporally correlated blocks as context information, thereby achieving more accurate probability estimation and context model selection, and improving the efficiency and accuracy of video encoding / decoding.

[0004] Other features and advantages of this application will become apparent from the following detailed description, or may be learned in part by practice of this application.

[0005] In a first aspect, embodiments of this application provide a video decoding method, comprising: obtaining the syntax elements of a temporally correlated block of a current block; performing context classification prediction on the syntax elements of the current block based on the syntax elements of the temporally correlated block to obtain the classification category corresponding to the syntax elements of the current block; determining the context probability model corresponding to the syntax elements of the current block based on the classification category corresponding to the syntax elements of the current block; and performing decoding processing on the current block based on the determined context probability model.

[0006] Secondly, embodiments of this application provide a video coding method, comprising: obtaining the syntax elements of a temporally correlated block of the current block; performing context classification prediction on the syntax elements of the current block based on the syntax elements of the temporally correlated block to obtain the classification category corresponding to the syntax elements of the current block; determining the context probability model corresponding to the syntax elements of the current block based on the classification category corresponding to the syntax elements of the current block; and encoding the current block based on the determined context probability model.

[0007] Thirdly, embodiments of this application provide a video decoding apparatus, comprising: an acquisition unit configured to acquire syntax elements of a temporally correlated block of a current block; a processing unit configured to perform context classification prediction on the syntax elements of the current block based on the syntax elements of the temporally correlated block, to obtain a classification category corresponding to the syntax elements of the current block; a determination unit configured to determine a context probability model corresponding to the syntax elements of the current block based on the classification category corresponding to the syntax elements of the current block; and a decoding unit configured to perform decoding processing on the current block based on the determined context probability model.

[0008] Fourthly, embodiments of this application provide a video encoding apparatus, comprising: an acquisition unit configured to acquire syntax elements of a temporally correlated block of a current block; a processing unit configured to perform context classification prediction on the syntax elements of the current block based on the syntax elements of the temporally correlated block, to obtain a classification category corresponding to the syntax elements of the current block; a determination unit configured to determine a context probability model corresponding to the syntax elements of the current block based on the classification category corresponding to the syntax elements of the current block; and an encoding unit configured to perform encoding processing on the current block based on the determined context probability model.

[0009] Fifthly, embodiments of this application provide a computer-readable medium having a computer program stored thereon, which, when executed by a processor, implements the video decoding method or video encoding method as described in the above embodiments.

[0010] Sixthly, embodiments of this application provide an electronic device, including: one or more processors; and a storage device for storing one or more computer programs, which, when executed by the one or more processors, cause the electronic device to implement the video decoding method or video encoding method as described in the above embodiments.

[0011] In a seventh aspect, embodiments of this application provide a computer program product comprising a computer program stored in a computer-readable storage medium. A processor of an electronic device reads from and executes the computer program from the computer-readable storage medium, causing the electronic device to perform the video decoding or video encoding methods provided in the various alternative embodiments described above.

[0012] Eighthly, embodiments of this application provide a method for storing a video stream, wherein the video stream is decoded according to the video decoding method described in the above embodiments, or the video stream is generated according to the video encoding method described in the above embodiments.

[0013] In some embodiments of this application, the technical solutions can obtain the syntax elements of the temporally correlated blocks of the current block, and then perform context classification prediction on the syntax elements of the current block based on the syntax elements of the temporally correlated blocks to obtain the classification category corresponding to the syntax elements of the current block. Furthermore, based on the classification category corresponding to the syntax elements of the current block, the context probability model corresponding to the syntax elements of the current block can be determined, and the current block can be decoded based on the determined context probability model. It is evident that the technical solutions of this application, by introducing the syntax elements of temporally correlated blocks as context information, achieve more accurate probability estimation and context model selection, significantly improving the efficiency and accuracy of video encoding and decoding, and are particularly suitable for processing complex motion scenes and encoding and decoding high-resolution videos.

[0014] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and do not limit this application. Attached Figure Description

[0015] Figure 1 A schematic diagram of an exemplary system architecture to which the technical solutions of the embodiments of this application can be applied is shown;

[0016] Figure 2 This diagram illustrates the placement of the video encoding and decoding devices in a streaming system.

[0017] Figure 3 A basic flowchart of a video encoder is shown;

[0018] Figure 4 A schematic diagram of the state update of the context model is shown;

[0019] Figure 5 A schematic diagram of the encoding order of the coded blocks in one embodiment is shown;

[0020] Figure 6 A flowchart of a video decoding method according to an embodiment of this application is shown;

[0021] Figure 7 A flowchart of a video encoding method according to an embodiment of this application is shown;

[0022] Figure 8 A schematic diagram illustrating the design principle of a motion-compensated context model according to an embodiment of this application is shown.

[0023] Figure 9 A block diagram of a video decoding apparatus according to an embodiment of this application is shown;

[0024] Figure 10 A block diagram of a video encoding apparatus according to an embodiment of this application is shown;

[0025] Figure 11 A schematic diagram of the structure of a computer system suitable for implementing the computer device of the present application is shown. Detailed Implementation

[0026] Exemplary embodiments will now be described in a more comprehensive manner with reference to the accompanying drawings. However, the exemplary embodiments can be implemented in various forms and should not be construed as limited to these examples; rather, these embodiments are provided so that this application will be more comprehensive and complete, and will fully convey the concept of the exemplary embodiments to those skilled in the art.

[0027] Furthermore, the features, structures, or characteristics described in this application can be combined in any suitable manner in one or more embodiments. Numerous specific details are provided in the following description to provide a full understanding of the embodiments of this application. However, those skilled in the art will recognize that when implementing the technical solutions of this application, not all the detailed features in the embodiments may be used, one or more specific details may be omitted, or other methods, elements, devices, steps, etc., may be employed.

[0028] In this application embodiment, the terms "module" or "unit" refer to a computer program or part of a computer program that has a predetermined function and works with other related parts to achieve a predetermined goal, and can be implemented wholly or partially using software, hardware (such as processing circuitry or memory), or a combination thereof. Similarly, a processor (or multiple processors or memory) can be used to implement one or more modules or units. Furthermore, each module or unit can be part of an overall module or unit that includes the functionality of that module or unit.

[0029] The block diagrams shown in the accompanying drawings are merely functional entities and do not necessarily correspond to physically independent entities. That is, these functional entities can be implemented in software, in one or more hardware modules or integrated circuits, or in different network and / or processor devices and / or microcontroller devices.

[0030] The flowcharts shown in the accompanying drawings are merely illustrative and do not necessarily include all content and operations / steps, nor do they necessarily have to be performed in the described order. For example, some operations / steps can be broken down, while others can be combined or partially combined; therefore, the actual execution order may change depending on the specific circumstances.

[0031] It should be noted that "multiple" in this article refers to two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, or B alone. The character " / " generally indicates that the preceding and following related objects have an "or" relationship.

[0032] Figure 1 A schematic diagram of an exemplary system architecture to which the technical solutions of the embodiments of this application can be applied is shown.

[0033] like Figure 1 As shown, system architecture 100 includes multiple terminal devices that can communicate with each other via, for example, a network 150. For instance, system architecture 100 may include a first terminal device 110 and a second terminal device 120 interconnected via network 150. Figure 1 In one embodiment, the first terminal device 110 and the second terminal device 120 perform unidirectional data transmission.

[0034] For example, the first terminal device 110 can encode video data (e.g., a video image stream captured by the terminal device 110) to transmit it to the second terminal device 120 via the network 150. The encoded video data is transmitted in the form of one or more encoded video streams. The second terminal device 120 can receive the encoded video data from the network 150, decode the encoded video data to recover the video data, and display video images based on the recovered video data.

[0035] In one embodiment of this application, system architecture 100 may include a third terminal device 130 and a fourth terminal device 140 that perform bidirectional transmission of encoded video data, such as during a video conference. For bidirectional data transmission, each of the third terminal device 130 and the fourth terminal device 140 may encode video data (e.g., a video image stream captured by the terminal device) for transmission over network 150 to the other terminal device. Each of the third terminal device 130 and the fourth terminal device 140 may also receive encoded video data transmitted by the other terminal device, decode the encoded video data to recover the video data, and display the video images on an accessible display device based on the recovered video data.

[0036] exist Figure 1 In the embodiments shown, the first terminal device 110, the second terminal device 120, the third terminal device 130 and the fourth terminal device 140 may be servers or terminals, but the principles disclosed in this application are not limited to these.

[0037] Servers can be standalone physical servers, server clusters or distributed systems composed of multiple physical servers, or cloud servers providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (CDNs), and big data and artificial intelligence platforms. Terminals can be smartphones, tablets, laptops, desktop computers, smart speakers, smart voice interaction devices, smartwatches, smart home appliances, in-vehicle terminals, aircraft, etc., but are not limited to these.

[0038] Figure 1 The network 150 shown represents any number of networks, including, for example, wired and / or wireless communication networks, that transmit encoded video data between the first terminal device 110, the second terminal device 120, the third terminal device 130, and the fourth terminal device 140. The communication network 150 may exchange data in circuit-switched and / or packet-switched channels. This network may include telecommunications networks, local area networks (LANs), wide area networks (WANs), and / or the Internet. For the purposes of this application, unless explained below, the architecture and topology of network 150 may be irrelevant to the operation of the disclosure herein.

[0039] In one embodiment of this application, Figure 2 The illustration shows the placement of video encoding and decoding devices in a streaming environment. The subject matter disclosed in this application is equally applicable to other video-enabled applications, including, for example, video conferencing, digital television (TV), and storing compressed video on digital media including CDs, DVDs, memory sticks, etc.

[0040] The streaming system may include an acquisition subsystem 213, which may include a video source 201 such as a digital camera, which creates an uncompressed video image stream 202. In an embodiment, the video image stream 202 includes samples captured by a digital camera. The video image stream 202 is depicted as a thick line to emphasize the high data volume of the video image stream compared to encoded video data 204 (or encoded video bitstream 204). The video image stream 202 may be processed by an electronic device 220, which includes a video encoding device 203 coupled to the video source 201. The video encoding device 203 may include hardware, software, or a combination of hardware and software to implement or enforce aspects of the disclosed subject matter as described in more detail below. The encoded video data 204 (or encoded video bitstream 204) is depicted as a thin line to emphasize the lower data volume of the encoded video data 204 (or encoded video bitstream 204), which may be stored on a streaming server 205 for future use. One or more streaming client subsystems, such as Figure 2 Client subsystems 206 and 208 can access streaming server 205 to retrieve copies 207 and 209 of encoded video data 204. Client subsystem 206 may include, for example, a video decoding device 210 in electronic device 230. Video decoding device 210 decodes the incoming copy 207 of the encoded video data and produces an output video picture stream 211 that can be displayed on display 212 (e.g., a screen) or another presentation device. In some streaming systems, the encoded video data 204, video data 207, and video data 209 (e.g., video stream) may be encoded according to certain video encoding / compression standards.

[0041] It should be noted that electronic devices 220 and 230 may include other components not shown in the figures. For example, electronic device 220 may include a video decoding device, and electronic device 230 may also include a video encoding device.

[0042] In one embodiment of this application, taking High Efficiency Video Coding (HEVC) and Versatile Video Coding (VVC) from international video coding standards, as well as the Chinese national video coding standard AVS, as examples, after an input video frame image, the video frame image is divided into several non-overlapping processing units according to a block size. Each processing unit performs a similar compression operation. This processing unit is called a Coding Tree Unit (CTU) or Largest Coding Unit (LCU). The CTU can be further subdivided into more refined units to obtain one or more basic Coding Units (CUs). The CU is the most basic element in a coding process.

[0043] In another embodiment, this processing unit can also be called a tile, which is a rectangular area of ​​a multimedia data frame that can be independently decoded and encoded. In the Alliance for Open Media Video 1 (AV1) standard, the tile can be further subdivided into one or more superblocks (SBs). The SB is the starting point for block partitioning and can be further divided into multiple subblocks. The superblocks are then further subdivided into one or more blocks. Each block is the most basic element in a coding process. Optionally, an SB can contain several blocks (Bs).

[0044] The above method of dividing video frame images can be called a block partition structure. The following introduces some concepts in the encoding process:

[0045] Predictive coding includes intra-frame prediction and inter-frame prediction. The original video signal is predicted from a selected reconstructed video signal to obtain a residual video signal. The encoder needs to decide which predictive coding mode to choose for the current coding unit (or coding block) and inform the decoder. Intra-frame prediction refers to the predicted signal coming from a region within the same image that has already been encoded and reconstructed; inter-frame prediction refers to the predicted signal coming from another encoded image (called a reference image) that is different from the current image.

[0046] Transform and Quantization: After the residual video signal undergoes transformation operations such as Discrete Fourier Transform (DFT) and Discrete Cosine Transform (DCT), the signal is transformed into the transform domain, and these are called transform coefficients. The transform coefficients are then subjected to lossy quantization, losing some information to make the quantized signal more suitable for compression. In some video coding standards, there may be more than one transform method to choose from. Therefore, the encoder needs to select one of the transform methods for the current coding unit (or coding block) and inform the decoder. The fineness of quantization is usually determined by the quantization parameter (QP). A larger QP value means that coefficients with a wider range of values ​​will be quantized into the same output, which usually leads to greater distortion and a lower bit rate. Conversely, a smaller QP value means that coefficients with a smaller range of values ​​will be quantized into the same output, which usually leads to less distortion and a higher bit rate.

[0047] Entropy coding, or statistical coding, involves statistically compressing the quantized transform-domain signal based on the frequency of each value, ultimately outputting a binary (0 or 1) compressed bitstream. Simultaneously, other information generated during encoding, such as the selected coding mode and motion vector data, also requires entropy coding to reduce the bit rate. Statistical coding is a lossless coding method that effectively reduces the bit rate required to represent the same signal. Common statistical coding methods include Variable Length Coding (VLC) and Content-Adaptive Binary Arithmetic Coding (CABAC).

[0048] Context-Based Binary Arithmetic Coding (CABAC) primarily involves three steps: binarization, context modeling, and binary arithmetic coding. After binarizing the input syntax elements, the binary data can be encoded using either a regular coding mode or a bypass coding mode. The bypass coding mode eliminates the need to assign a specific probability model to each binary bit; the input binary bit bin value is directly encoded using a simple bypass encoder, thus accelerating the overall encoding and decoding speed. Generally, different syntax elements are not completely independent, and even identical syntax elements possess a certain degree of memory. Therefore, according to conditional entropy theory, using other encoded syntax elements for conditional coding can further improve coding performance compared to independent coding or memoryless coding. This encoded symbol information used as conditions is called the context. In the regular coding mode, the binary bits of the syntax elements sequentially enter the context modeler. The encoder assigns an appropriate probability model to each input binary bit based on the values ​​of previously encoded syntax elements or binary bits; this process is called context modeling. The context model corresponding to a grammatical element can be located using the context index increment (ctxIdxInc) and the context index start (ctxIdxStart). After the bin value and the assigned probability model are fed into the binary arithmetic encoder for encoding, the context model needs to be updated based on the bin value, which is the adaptive process in encoding.

[0049] Loop Filtering: The transformed and quantized signal undergoes inverse quantization, inverse transform, and prediction compensation to obtain a reconstructed image. Due to the effects of quantization, the reconstructed image differs from the original image in some aspects, resulting in distortion. Therefore, filtering operations can be performed on the reconstructed image, such as deblocking filters (DB), sample adaptive offset (SAO), or adaptive loop filters (ALF), to effectively reduce the distortion caused by quantization. Since these filtered reconstructed images will serve as a reference for subsequent coded images to predict future image signals, the aforementioned filtering operations are also called loop filtering, i.e., filtering operations within the coding loop.

[0050] In one embodiment of this application, Figure 3 A basic flowchart of a video encoder is shown, illustrating the process using intra-frame prediction as an example. The original image signal s...k [x,y] and the predicted image signal Perform the difference operation to obtain the residual signal u. k [x,y], residual signal u k After transformation and quantization, [x,y] is obtained as quantization coefficients. These coefficients are then used to obtain the encoded bitstream through entropy encoding, and to obtain the reconstructed residual signal u' through inverse quantization and inverse transform. k [x,y], predict image signal With the reconstructed residual signal u' k [x,y] superimposed to generate image signals Image signal On one hand, the signal is input to the intra-frame mode decision module and the intra-frame prediction module for intra-frame prediction processing; on the other hand, the reconstructed image signal s' is output through loop filtering. k [x,y], reconstruct the image signal s' k [x,y] can be used as a reference image for the next frame for motion estimation and motion compensation prediction. Then, based on the result s' of the motion compensation prediction... r [x+m x ,y+m y ] and intra-frame prediction results Obtain the predicted image signal for the next frame. And continue repeating the above process until the coding is complete.

[0051] Based on the above encoding process, at the decoding end, for each encoding unit (or encoding block), after acquiring the compressed bitstream (i.e., bitstream), entropy decoding is performed to obtain various mode information and quantization coefficients. Then, the quantization coefficients undergo inverse quantization and inverse transform processing to obtain the residual signal. On the other hand, based on the known encoding mode information, the prediction signal corresponding to the encoding unit (or encoding block) can be obtained. Then, the residual signal and the prediction signal are added together to obtain the reconstructed signal. The reconstructed signal then undergoes loop filtering and other operations to generate the final output signal.

[0052] The technical solution of this application involves the aforementioned algorithm encoding process. In arithmetic encoding, the encoding engine needs to perform entropy encoding on each symbol based on its current probability model, and update the state of the symbol's probability model after encoding based on the actual value of the current symbol, so as to obtain a more accurate probability estimate when the next symbol appears, thereby improving encoding efficiency. In an arithmetic encoder like CABAC, the symbol to be encoded is binarized into bits (0 or 1), and the encoding and decoding process can flexibly select and switch different probability models and update them for each binarized syntax element according to a specific context (i.e., based on the already encoded information), thereby improving the efficiency of entropy encoding.

[0053] For each bit to be encoded, based on prior information from the same probability model that has already been encoded and decoded, there exists a high-probability estimate for its value of 0 (or 1), known as the Most Probable Symbol (MPS). Correspondingly, there is a probability for its value of 1 (or 0), called the Least Probable Symbol (LPS), where MPS + LPS = 1. The arithmetic encoder is efficient when the actual bit value matches the high-probability estimate; conversely, it is inefficient when the actual bit value matches the low-probability estimate. After each bit is encoded, the state of the probability model in the context of that symbol needs to be updated accordingly to reflect the latest statistical patterns after the addition of the current symbol. The probability model state can be obtained by looking up a table, such as... Figure 4 As shown, each time the sign of MPS appears, the probability estimate of MPS increases, corresponding to a state transitioning to a higher probability (e.g., ...). Figure 4 The high-probability transition curve shown in the figure); conversely, each time the LPS symbol appears, the probability estimate of MPS decreases, corresponding to a state transitioning to a lower probability (e.g., the high-probability transition curve shown in the figure); Figure 4 (The low-probability transition curve is shown in the diagram). The state update of the context model will be completed before the next symbol is entropy encoded, thus obtaining a new probability model to encode the next symbol.

[0054] exist Figure 4 In the state update diagram shown, the probability space is divided into 64 states from 0 to 1. When the state of the context probability model transitions to a higher probability direction, the MPS probability increases relatively slowly; when the state of the context probability model transitions to a lower probability direction, the transition speed depends on the current state's position and is not a fixed value. For example, the current state may be in a higher probability (e.g., ...). Figure 4 If the current state is in the right-hand region of the middle region, then an LPS will cause the probabilistic model state to shift 7 steps towards lower probability; while if the current state is in a low-probability region (e.g., the right-hand region of the middle ... Figure 4 If the left-hand state region is in the middle, then an LPS will only cause the probability model state to shift by 1 step towards a lower probability.

[0055] In video coding, the encoding of the same syntax element is performed according to the encoding / decoding order of the CUs (Code Units). CUs that are adjacent in the encoding / decoding order are encoded according to the logic of the CTU (Code Unit) to CU division. For example, in... Figure 5 In the encoding order shown, CTU L A combination of quadtree and binary tree partitioning was performed, with the encoding and decoding order being CU0-CU8. It is evident that physically adjacent CUs are not necessarily adjacent in encoding order (e.g., in CTU). LIn this example, CU3 and CU6 are physically adjacent, but their encoding order is not adjacent. This means that when the probability model of the same syntax element is updated after the current CU encoding and decoding is completed, it reflects the probability distribution of the current position, which may differ from the probability characteristics of the next CU position.

[0056] To overcome the above problems, in related technologies, the values ​​of the syntax elements of the bottommost coding blocks in the uppermost CTU of the current CTU are retained in memory. If the current CTU (e.g., Figure 5 The CTU shown C Start encoding the first CU block (e.g.) Figure 5 The CTU shown C If CU0 is used, then the left-side CTU will no longer be used according to the usual procedure. L The last coded block (e.g.) Figure 5 The CTU shown L Instead of using the CU8 encoded probabilistic model state, this state is encoded using the CTU above. A The bottom few coded blocks (e.g., according to) Figure 5 The CTU shown A The state of the probability model is updated by taking the values ​​of the corresponding syntax elements in the order of CU6, CU5, CU2, and CU1 in the current CTU, and then the first coded block of the current CTU (e.g., ...) is updated. Figure 5 The CTU shown C Entropy encoding is performed on CU0 in the CU0.

[0057] Furthermore, when performing arithmetic encoding on a specific grammatical element, to ensure that the grammatical element in the current block is in a state with the highest possible probability, context modeling is required. This involves using various encoded information to classify and predict whether the current grammatical element might be in a state of "0" or "1". Specifically, the values ​​of neighboring encoded information are used to classify the context of the current grammatical element, assigning a probability state to each class. This state is accumulated and updated through continuous encoding, resulting in a more accurate probability model than no classification, thus improving encoding efficiency.

[0058] For example, when performing arithmetic encoding on the `skip_flag` flag indicating whether the current block uses skip mode, context classification can be performed by referring to whether the blocks above and to the left of the current block are encoded using skip mode. Figure 5 For example, regarding the current CTU CWhen encoding the `skip_flag` of CU0, the context of this syntax element can be divided into three states (0, 1, and 2) through different values ​​of `ctx = (CU1 == skip? 1:0) + (CU3 == skip? 1:0)`, which are then used for arithmetic encoding and probabilistic state updates respectively. Here, `CU1 == skip? 1:0` is the conditional operator, meaning if CTU... A If CU1 is the skip mode, then the expression evaluates to 1; if CTU A If CU1 is not in skip mode, then the expression evaluates to 0. Similarly, CU3 == skip? 1:0 means if CTU L If CU3 is the skip mode, then the expression evaluates to 1; if CTU L If CU3 is not a skip mode, then the expression evaluates to 0.

[0059] As described above, the probability model update process in the arithmetic coding schemes proposed in related technologies does not fully consider the sequential relationship of syntax elements in the coding order. The physical location of the current block and the update of the probability model are not continuous, meaning the updated probability model may not match the statistical characteristics of the new syntax elements in the current block. Furthermore, the context model mainly relies on information from spatially adjacent blocks (such as the blocks above and to the left of the current block) for probability estimation. While this method can provide some predictive ability, the probability estimation is not accurate enough, especially when dealing with complex motion scenes.

[0060] Based on the aforementioned technical problems, this application proposes a new technical solution that can introduce the syntax elements of temporally correlated blocks as context information, thereby achieving more accurate probability estimation and context model selection, significantly improving the efficiency and accuracy of video encoding and decoding, and is particularly suitable for processing complex motion scenes and encoding and decoding high-resolution videos.

[0061] The implementation details of the technical solutions in the embodiments of this application are described in detail below:

[0062] Figure 6 A flowchart of a video decoding method according to an embodiment of this application is shown. This video decoding method can be executed by a device with computing processing capabilities, such as a terminal device or a server. (Refer to...) Figure 6 As shown, this video decoding method includes at least S610 to S640, which are described in detail below:

[0063] In S610, the syntax elements of the time-domain related blocks of the current block are obtained.

[0064] In some optional embodiments, the video contains a sequence of video image frames, which includes a series of images. Each image can be further divided into slices, and each slice can be further divided into a series of LCUs (or CTUs). Each LCU contains several CUs. Video image frames are encoded in blocks. In some newer video coding standards, such as H.264, there are macroblocks (MBs), which can be further divided into multiple prediction blocks for predictive coding. In the HEVC standard, basic concepts such as coding units (CUs), prediction units (PUs), and transform units (TUs) are used. In the embodiments of this application, the current block can be a CU, or a block smaller than a CU.

[0065] In some alternative embodiments, the temporal correlated block can be determined based on the motion vector of the current block. For example, the motion vector of the current block can be decoded from the video bitstream, and then the block in the reference frame pointed to by the motion vector can be used as the temporal correlated block of the current block.

[0066] In some alternative embodiments, if the current block has at least two motion vectors, then a motion vector can be selected from these at least two motion vectors to determine the temporal-domain correlated block of the current block, for example, by randomly selecting a motion vector from these at least two motion vectors, or by selecting a motion vector from these at least two motion vectors according to a set selection order.

[0067] In some alternative embodiments, if the current block has at least two motion vectors, then at least two temporally correlated blocks of the current block can also be determined based on these at least two motion vectors.

[0068] In some optional embodiments, a co-located block at the same position in the image as the current block can be selected as a temporally correlated block within the reference frame of the current block. In this case, the motion vector of the current block can be considered to be 0.

[0069] In some optional embodiments, a co-located block at the same position in the image as the current block can be selected as a temporally correlated block within a specified co-located reference frame corresponding to the current block. In this embodiment, the motion vector of the current block can be considered to be 0. Since one or more co-located reference frames may be set for the current frame or the current strip to determine the motion vector, a co-located reference frame (such as the co-located reference frame closest to the current frame) can be specified from these one or more co-located reference frames. Then, the co-located block of the current block can be determined from the specified co-located reference frame to serve as the temporally correlated block of the current block.

[0070] It should be noted that the syntax elements in the embodiments of this application are the basic units used by the encoder and decoder to represent video frame information. These syntax elements cover various information from macroblocks or coding units to motion vectors, prediction modes, etc. For example, syntax elements can be syntax elements that indicate transform coefficients, such as indicating whether there are non-zero transform coefficients in the block, indicating the specific value of the transform coefficients, etc.; syntax elements can also be syntax elements that indicate whether to skip the transform, or syntax elements that indicate quantization parameters, etc.

[0071] In S620, based on the syntax elements of the temporally related block, context classification prediction is performed on the syntax elements of the current block to obtain the classification category corresponding to the syntax elements of the current block.

[0072] In some optional embodiments, the syntax elements of the temporally correlated block can be used to perform contextual classification prediction on the syntax elements of the current block. For example, if the syntax elements of the temporally correlated block are used to indicate whether it is a skip mode, then if the syntax elements of the temporally correlated block indicate that the temporally correlated block adopts the skip mode, then the classification category corresponding to the syntax elements of the current block can be 1; if the syntax elements of the temporally correlated block indicate that the temporally correlated block does not adopt the skip mode, then the classification category corresponding to the syntax elements of the current block can be 0.

[0073] In some optional embodiments, in addition to using the syntax elements of temporally correlated blocks to perform context classification prediction of the syntax elements of the current block, the syntax elements of spatially adjacent blocks of the current block can also be combined to perform context classification prediction of the syntax elements of the current block. Optionally, the spatially adjacent blocks of the current block refer to blocks that are in the same frame as the current block and are spatially adjacent to it. These spatially adjacent blocks may include the block above, the block to the left, the block to the upper left, the block to the upper right, etc. of the current block.

[0074] In some optional embodiments, if context classification prediction is performed on the syntax elements of the current block based on the syntax elements of the temporally related block and the syntax elements of the spatially adjacent block, then the value of the first syntax element corresponding to the spatially adjacent block can be determined based on the syntax elements of the spatially adjacent block, and the value of the second syntax element corresponding to the temporally related block can be determined based on the syntax elements of the temporally related block. Then, based on the value of the first syntax element and the value of the second syntax element, a classification category identifier corresponding to the syntax elements of the current block is generated. This classification category identifier is used to identify the classification category.

[0075] Specifically, for example, if the syntax elements of the temporally related block and the spatially adjacent block are syntax elements used to indicate whether it is a skip mode, then if the syntax element of the spatially adjacent block indicates that the spatially adjacent block is in skip mode, the value of the first syntax element corresponding to the spatially adjacent block can be 1; if the syntax element of the spatially adjacent block indicates that the spatially adjacent block is not in skip mode, the value of the first syntax element corresponding to the spatially adjacent block can be 0. Similarly, if the syntax element of the temporally related block indicates that the temporally related block is in skip mode, the value of the second syntax element corresponding to the temporally related block can be 1; if the syntax element of the temporally related block indicates that the temporally related block is not in skip mode, the value of the second syntax element corresponding to the temporally related block can be 0.

[0076] In some optional embodiments, the process of generating the classification category identifier corresponding to the syntax element of the current block based on the values ​​of the first and second syntax elements can be a comprehensive operation on the values ​​of the first and second syntax elements. For example, the values ​​of the first and second syntax elements can be accumulated, and the accumulated result can be used as the classification category identifier corresponding to the syntax element of the current block. Specifically, if a spatially adjacent block is used, and the value of the first syntax element corresponding to the spatially adjacent block is 1, and the value of the second syntax element corresponding to the temporally related block is also 1, then the classification category identifier corresponding to the syntax element of the current block can be 2; if the value of the first syntax element corresponding to the spatially adjacent block is 1, and the value of the second syntax element corresponding to the temporally related block is also 0, then the classification category identifier corresponding to the syntax element of the current block can be 1.

[0077] In some optional embodiments, the process of combining the values ​​of the first and second syntax elements can also involve first performing a calculation on the value of the second syntax element based on a set operator to obtain the calculation result, then accumulating the value of the first syntax element with the calculation result, and using the accumulated result as the classification category identifier corresponding to the syntax element of the current block. Specifically, if a spatially adjacent block is used, and the value of the first syntax element corresponding to the spatially adjacent block is 1, and the value of the second syntax element corresponding to the temporally related block is also 1, the set operator can be to calculate three times the value of the second syntax element, then the classification category identifier corresponding to the syntax element of the current block can be 1 + 3 × 1 = 4; if the value of the first syntax element corresponding to the spatially adjacent block is 1, and the value of the second syntax element corresponding to the temporally related block is also 0, then the classification category identifier corresponding to the syntax element of the current block can be 1 + 3 × 0 = 1.

[0078] It should be noted that the operator used to perform the operation on the value of the second syntax element can be any operator set according to actual needs. Furthermore, when performing context classification prediction on the syntax element of the current block based on the syntax elements of the temporally related blocks and the syntax elements of the spatially adjacent blocks, the number of spatially adjacent blocks used can be one or more; similarly, the number of temporally related blocks can also be one or more.

[0079] In some optional embodiments, if the current block does not have a motion vector, such as when the current block uses intra-prediction mode, the syntax element value of the temporally correlated block of the current block can be set to 0. Optionally, in other embodiments of this application, the syntax element value of the temporally correlated block of the current block can also be set to other values, such as 1, 2, etc.

[0080] In S630, the context probability model corresponding to the syntax element of the current block is determined based on the classification category corresponding to the syntax element of the current block.

[0081] In some optional embodiments, the context probability model corresponding to the syntax element of the current block can be determined based on the mapping relationship between the classification category and the context probability model. For example, different classification categories can correspond to different context probability models, so after determining the classification category corresponding to the syntax element of the current block, the context probability model corresponding to the syntax element of the current block can be determined.

[0082] In a specific example, suppose the syntax element of the current block is used to indicate whether it is a skip mode. During classification prediction, the syntax elements of two spatially adjacent blocks and one temporally related block are used. The classification category identifier corresponding to the syntax element of the current block is obtained by summing the values ​​of the syntax elements of the spatially adjacent blocks and the temporally related blocks. When the spatially adjacent block or the temporally related block is a skip mode, the corresponding syntax element value is 1, and when the spatially adjacent block or the temporally related block is not a skip mode, the corresponding syntax element value is 0. Then, the classification category corresponding to the syntax element of the current block can be one of the following four results: 0 (i.e., neither of the two spatially adjacent blocks nor the temporally related block is a skip mode), 1 (i.e., only one of the two spatially adjacent blocks and the temporally related block is a skip mode), 2 (i.e., two of the two spatially adjacent blocks and the temporally related block are skip modes), and 3 (i.e., both of the two spatially adjacent blocks and the temporally related block are skip modes). In this case, category 0 can correspond to a low skip pattern probability model, category 1 can correspond to a medium skip pattern probability model, category 2 can correspond to a high skip pattern probability model, and category 3 can correspond to a very high skip pattern probability model.

[0083] Continue to refer to Figure 6 As shown, in S640, the current block is decoded based on a determined context probability model.

[0084] In some optional embodiments, the process of decoding the current block based on a defined context probability model can be as follows: The encoded data of the current block is read from the video bitstream, and then the read encoded data is decoded using an arithmetic decoder. The decoding process can involve decoding each symbol bit by bit according to the state of the defined context probability model. During decoding, the decoder updates the state of the context probability model based on the actual value (0 or 1) of the current symbol. If the actual bit value matches the MPS, the probability estimate of the MPS is improved; if it matches the LPS, the probability estimate of the MPS is decreased. This decoding process is repeated until the decoding of the current block is complete.

[0085] Figure 6 This description focuses on the technical solutions of the embodiments of this application from the perspective of video decoding. The following is a combination of... Figure 7 The technical solutions of the embodiments of this application will be described again from the perspective of video encoding.

[0086] Figure 7 A flowchart of a video encoding method according to an embodiment of this application is shown. This video encoding method can be executed by a device with computing processing capabilities, such as a terminal device or a server. (Refer to...) Figure 7 As shown, this video encoding method includes at least S710 to S740, which are detailed below:

[0087] In S710, the syntax elements of the time-domain related blocks of the current block are obtained.

[0088] In S720, based on the syntax elements of the temporally related block, context classification prediction is performed on the syntax elements of the current block to obtain the classification category corresponding to the syntax elements of the current block.

[0089] In S730, the context probability model corresponding to the syntax element of the current block is determined based on the classification category corresponding to the syntax element of the current block.

[0090] In S740, the current block is encoded based on a deterministic context probability model.

[0091] It should be noted that the processing at the video encoding end is similar to that at the video decoding end. For details, please refer to the aforementioned processing at the decoding end, which will not be repeated here.

[0092] The technical solutions of the above embodiments of this application introduce the syntax elements of temporally correlated blocks as context information, thereby achieving more accurate probability estimation and context model selection, significantly improving the efficiency and accuracy of video encoding and decoding, and are particularly suitable for processing complex motion scenes and encoding and decoding high-resolution videos.

[0093] The following combination Figure 8 The technical solution of one embodiment of this application will be described as follows:

[0094] The technical solution of this application embodiment is mainly that when performing arithmetic encoding on the syntax elements of the current block, the design of its context model takes into account the encoding information of the motion compensation block (i.e., the i.e., the domain-related block) of the current block in the reference frame, thereby designing a more accurate context model classification and improving encoding efficiency.

[0095] Specifically, refer to Figure 8 As shown, assuming the CU above the current CU is CUA, the CU to the left of the current CU is CUL, the CU containing the top-left corner of the reference block of the current CU (i.e., the temporally related block of the current CU) is CUR, and the motion vector of the current CU is MV, then when performing context modeling on the syntax elements of the current CU, in addition to considering the spatially adjacent blocks of the current CU, such as CUA and CUL, we can also consider the temporally related blocks of the current CU guided by the motion vector, such as CUR. Optionally, the values ​​of the encoded information in CUR can be designed as a separate context dimension, or considered as an increment of the values ​​of the existing context model.

[0096] In some optional embodiments, assuming that the syntax element is a flag indicating the skip mode, such as cu_skip_flag, then for a specific image or strip, its context model derivation can be ctx = (CUA == skip? 1:0) + (CUL == skip? 1:0) + (CUR == skip? 1:0). Depending on the different values ​​of ctx, the context probability model of this syntax element can be divided into several models: 0, 1, 2, and 3. That is, different values ​​of ctx correspond to different context probability models.

[0097] In some optional embodiments, assuming that the syntax element is a flag indicating the skip mode, such as cu_skip_flag, then for a specific image or strip, its context model derivation can be ctx = (CUA == skip? 1:0) + (CUL == skip? 1:0) + 3 × (CUR == skip? 1:0). According to different values ​​of ctx, the context of this syntax element is divided into several models: 0, 1, 2, 3, 4, and 5. That is, different values ​​of ctx correspond to different context probability models.

[0098] In some optional embodiments, assuming that the syntax element is a flag indicating whether the current block has non-zero transform coefficients, such as _rqt_root_cbf_ or cu_coded_flag, then for a specific image or stripe, the value of the syntax element of the previous block in the encoding order is denoted as cbf_flag(lastCU), and the value of the syntax element of the temporally correlated block of the current block is denoted as cbf_flag(CUR). Then the context model derivation can be ctx = cbf_flag(lastCU) + cbf_flag(CUR). According to the different values ​​of ctx, the context of this syntax element is divided into several models such as 0 and 1, that is, different values ​​of ctx correspond to different context probability models.

[0099] The above embodiments are merely examples. In other embodiments of this application, the syntax elements used may be other types of syntax elements, and the combination of encoded information values ​​may be adjusted according to actual needs.

[0100] In some alternative embodiments, if the current block has two or more MVs (i.e., bidirectional or multidirectional prediction), then only the temporal correlated block pointed to by one MV can be considered, or two or more temporal correlated blocks can be considered simultaneously.

[0101] In some optional embodiments, if the current block is not encoded in an inter-frame prediction manner and has no corresponding motion vector, then it can be assumed that the temporally correlated block of the current block does not exist, and the encoding information of the corresponding CUR is set to 0, or it can be set to other values.

[0102] In some alternative embodiments, the MV of the current block can be considered to be 0. In this case, the temporally related block of the current block can be the block at the same position in the reference image, i.e., the co-position block in the reference image.

[0103] In some alternative embodiments, the MV of the current block can be considered to be 0. In this case, the temporally correlated block of the current block can be a co-position block in a specified co-position reference image. This is because one or more co-position reference images may be set for the current image or the current strip to determine the motion vector. Therefore, a co-position reference image (such as the co-position reference image closest to the current image) can be specified from these one or more co-position reference images, and then the co-position block of the current block can be determined from the specified co-position reference image as the temporally correlated block of the current block.

[0104] As can be seen, the technical solution of this application embodiment can provide a more accurate model selection for the arithmetic encoding of syntax elements without increasing the design of the code stream identifier context model, thereby improving prediction accuracy and encoding efficiency.

[0105] It should be noted that the technical solutions of the various embodiments shown above can be used individually or in combination. Furthermore, the technical solutions of the embodiments of this application can be applied to related products such as video codecs or video compression.

[0106] The following describes an apparatus embodiment of this application, which can be used to perform the methods described in the above embodiments of this application. For details not disclosed in the apparatus embodiments of this application, please refer to the method embodiments described above.

[0107] Figure 9 A block diagram of a video decoding apparatus according to an embodiment of the present application is shown. The video decoding apparatus can be installed in a device with computing processing capabilities, such as a terminal device or a server.

[0108] Reference Figure 9 As shown, a video decoding apparatus 900 according to an embodiment of this application includes: an acquisition unit 902, a processing unit 904, a determination unit 906, and a decoding unit 908.

[0109] The acquisition unit 902 is configured to acquire the syntax elements of the temporally related blocks of the current block; the processing unit 904 is configured to perform context classification prediction on the syntax elements of the current block based on the syntax elements of the temporally related blocks to obtain the classification category corresponding to the syntax elements of the current block; the determination unit 906 is configured to determine the context probability model corresponding to the syntax elements of the current block based on the classification category corresponding to the syntax elements of the current block; and the decoding unit 908 is configured to perform decoding processing on the current block based on the determined context probability model.

[0110] In some embodiments of this application, based on the foregoing scheme, the acquisition unit 902 is further configured to: acquire the syntax elements of the spatially adjacent blocks of the current block; the processing unit 904 is configured to: perform context classification prediction on the syntax elements of the current block based on the syntax elements of the temporally related blocks and the syntax elements of the spatially adjacent blocks.

[0111] In some embodiments of this application, based on the foregoing scheme, the processing unit 904 is configured to: determine the value result of the first syntax element corresponding to the spatial adjacent block according to the syntax element of the spatial adjacent block; determine the value result of the second syntax element corresponding to the temporal related block according to the syntax element of the temporal related block; and generate a classification category identifier corresponding to the syntax element of the current block according to the first syntax element value result and the second syntax element value result, wherein the classification category identifier is used to identify the classification category.

[0112] In some embodiments of this application, based on the foregoing scheme, the processing unit 904 is configured to: accumulate the value result of the first syntax element and the value result of the second syntax element, and use the accumulated result as the classification category identifier corresponding to the syntax element of the current block.

[0113] In some embodiments of this application, based on the foregoing scheme, the processing unit 904 is configured to: perform a calculation on the value result of the second syntax element based on a set operator to obtain a calculation result; accumulate the value result of the first syntax element with the calculation result, and use the accumulated result as the classification category identifier corresponding to the syntax element of the current block.

[0114] In some embodiments of this application, based on the foregoing scheme, the acquisition unit 902 is further configured to: acquire the motion vector of the current block, and determine the temporal-domain correlated block of the current block based on the motion vector of the current block.

[0115] In some embodiments of this application, based on the foregoing scheme, the acquisition unit 902 is configured to: if the current block has at least two motion vectors, determine the temporal-domain correlated block of the current block by selecting one motion vector from the at least two motion vectors, or determine at least two temporal-domain correlated blocks of the current block based on the at least two motion vectors.

[0116] In some embodiments of this application, based on the foregoing scheme, the acquisition unit 902 is configured to: if the current block does not have a motion vector, then set the syntax element value of the temporal domain related block of the current block to 0.

[0117] In some embodiments of this application, based on the foregoing scheme, the acquisition unit 902 is configured to: select a co-position block in the reference frame of the current block that is at the same position in the image as the current block as the temporal related block.

[0118] In some embodiments of this application, based on the foregoing scheme, the acquisition unit 902 is configured to: in the specified co-position reference frame corresponding to the current block, the co-position block that is at the same position in the image as the current block is taken as the temporal related block.

[0119] Figure 10 A block diagram of a video encoding apparatus according to an embodiment of the present application is shown. The video encoding apparatus can be installed in a device with computing processing capabilities, such as a terminal device or a server.

[0120] Reference Figure 10 As shown, a video encoding apparatus 1000 according to an embodiment of this application includes: an acquisition unit 1002, a processing unit 1004, a determination unit 1006, and an encoding unit 1008.

[0121] The acquisition unit 1002 is configured to acquire the syntax elements of the temporally related blocks of the current block; the processing unit 1004 is configured to perform context classification prediction on the syntax elements of the current block based on the syntax elements of the temporally related blocks to obtain the classification category corresponding to the syntax elements of the current block; the determination unit 1006 is configured to determine the context probability model corresponding to the syntax elements of the current block based on the classification category corresponding to the syntax elements of the current block; and the encoding unit 1008 is configured to perform encoding processing on the current block based on the determined context probability model.

[0122] Figure 11 A schematic diagram of a computer system suitable for implementing the computer device of the present application is shown. The electronic device may be a video encoding device or a video decoding device as described in the foregoing embodiments.

[0123] It should be noted that, Figure 11 The computer system 1100 of the computer device shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments of this application.

[0124] like Figure 11 As shown, the computer system 1100 may include a Central Processing Unit (CPU) 1101, which can perform various appropriate actions and processes based on a program stored in Read-Only Memory (ROM) 1102 or a program loaded from storage portion 1108 into Random Access Memory (RAM) 1103, such as performing the methods described in the above embodiments. Various programs and data required for system operation are also stored in RAM 1103. The CPU 1101, ROM 1102, and RAM 1103 are interconnected via bus 1104. An input / output (I / O) interface 1105 is also connected to bus 1104.

[0125] The following components can be connected to I / O interface 1105: an input section 1106 including a keyboard, mouse, etc.; an output section 1107 including a cathode ray tube (CRT), liquid crystal display (LCD), etc., and speakers, etc.; a storage section 1108 including a hard disk, etc.; and a communication section 1109 including a network interface card such as a LAN (Local Area Network) card, modem, etc. The communication section 1109 performs communication processing via a network such as the Internet. A drive 1110 is also connected to I / O interface 1105 as needed. Removable media 1111, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., are installed on drive 1110 as needed so that computer programs read from them can be installed into storage section 1108 as needed.

[0126] Specifically, according to embodiments of this application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of this application include a computer program product comprising a computer program carried on a computer-readable medium for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication section 1109, and / or installed from removable medium 1111. When the computer program is executed by central processing unit (CPU) 1101, it performs various functions defined in the system of this application.

[0127] It should be noted that the computer-readable medium shown in the embodiments of this application can be a computer-readable signal medium or a computer-readable storage medium, or any combination of the two. A computer-readable storage medium can be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM), flash memory, optical fiber, portable compact disc read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this application, a computer-readable storage medium can be any tangible medium containing or storing a computer program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In this application, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying a computer-readable computer program. The transmitted data signal can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. The computer-readable signal medium can also be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The computer program contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to wireless, wired, etc., or any suitable combination thereof.

[0128] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this application. Each block in a flowchart or block diagram may represent a module, segment, or portion of code, which contains one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram or flowchart, and combinations of blocks in a block diagram or flowchart, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and a computer program.

[0129] The units described in the embodiments of this application can be implemented in software or hardware, and the described units can also be located in a processor. The names of these units do not necessarily limit the specific unit itself.

[0130] In another aspect, this application also provides a computer-readable medium, which may be included in the computer device described in the above embodiments; or it may exist independently and not assembled into the computer device. The computer-readable medium carries one or more computer programs, which, when executed by the computer device, cause the computer device to perform the methods described in the above embodiments.

[0131] It should be noted that although several modules or units for the device used to perform actions have been mentioned in the detailed description above, this division is not mandatory. In fact, according to the embodiments of this application, the features and functions of two or more modules or units described above can be embodied in one module or unit. Conversely, the features and functions of one module or unit described above can be further divided and embodied by multiple modules or units.

[0132] From the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein can be implemented by software or by combining software with necessary hardware. Therefore, the technical solutions according to the embodiments of this application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (such as a CD-ROM, USB flash drive, external hard drive, etc.) or on a network, and includes several instructions to cause a computer device to execute the method according to the embodiments of this application.

[0133] For example, an electronic device can be a video decoding device, then the video decoding device can perform... Figure 6 The video decoding method shown; for example, an electronic device can be a video encoding device, then the video encoding device can perform... Figure 7 The video encoding method shown.

[0134] Other embodiments of this application will readily occur to those skilled in the art upon consideration of the specification and practice of the embodiments disclosed herein. This application is intended to cover any variations, uses, or adaptations of this application that follow the general principles of this application and include common knowledge or customary techniques in the art not disclosed herein.

[0135] It should be understood that this application is not limited to the precise structure described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this application is limited only by the appended claims.

Claims

1. A video decoding method, characterized in that, include: Retrieves the syntax elements of the temporal related blocks of the current block; Based on the syntax elements of the time-domain related block, context classification prediction is performed on the syntax elements of the current block to obtain the classification category corresponding to the syntax elements of the current block; Based on the classification category corresponding to the syntax element of the current block, determine the context probability model corresponding to the syntax element of the current block; The current block is decoded based on the determined context probability model.

2. The video decoding method according to claim 1, characterized in that, The video decoding method further includes: obtaining the syntax elements of the spatial adjacent blocks of the current block; Based on the grammatical elements of the time-domain correlated block, context classification prediction is performed on the grammatical elements of the current block, including: Based on the syntax elements of the temporally related block and the syntax elements of the spatially adjacent block, the syntax elements of the current block are classified and predicted according to context.

3. The video decoding method according to claim 2, characterized in that, Based on the syntax elements of the temporally related block and the syntax elements of the spatially adjacent block, context classification prediction is performed on the syntax elements of the current block to obtain the classification category corresponding to the syntax elements of the current block, including: Based on the syntax elements of the adjacent blocks in the spatial domain, determine the value of the first syntax element corresponding to the adjacent blocks in the spatial domain; Based on the syntax elements of the time-domain related block, determine the value of the second syntax element corresponding to the time-domain related block; Based on the values ​​of the first and second syntax elements, a category identifier corresponding to the syntax element of the current block is generated, and the category identifier is used to identify the category.

4. The video decoding method according to claim 3, characterized in that, Based on the values ​​of the first and second syntax elements, a category identifier corresponding to the syntax elements of the current block is generated, including: The values ​​of the first and second syntax elements are summed, and the sum is used as the category identifier corresponding to the syntax element of the current block.

5. The video decoding method according to claim 3, characterized in that, Based on the values ​​of the first and second syntax elements, a category identifier corresponding to the syntax elements of the current block is generated, including: The second syntax element is evaluated using the set operator to obtain the result. The value of the first syntax element is added to the operation result, and the added result is used as the category identifier corresponding to the syntax element of the current block.

6. The video decoding method according to any one of claims 1 to 5, characterized in that, The video decoding method further includes: Obtain the motion vector of the current block, and determine the temporal-domain correlated block of the current block based on the motion vector of the current block.

7. The video decoding method according to claim 6, characterized in that, The video decoding method further includes: If the current block has at least two motion vectors, then the temporal-domain correlated block of the current block is determined by selecting one motion vector from the at least two motion vectors, or at least two temporal-domain correlated blocks of the current block are determined based on the at least two motion vectors.

8. The video decoding method according to claim 6, characterized in that, The video decoding method further includes: If the current block does not have a motion vector, then the syntax element value of the temporal related block of the current block is set to 0.

9. The video decoding method according to claim 6, characterized in that, The video decoding method further includes: In the reference frame of the current block, a co-position block that is at the same position in the image as the current block is selected as the temporal correlated block.

10. The video decoding method according to claim 6, characterized in that, The video decoding method further includes: In the specified co-position reference frame corresponding to the current block, the co-position block that is at the same position in the image as the current block is the temporal related block.

11. A video encoding method, characterized in that, include: Retrieves the syntax elements of the temporal related blocks of the current block; Based on the syntax elements of the time-domain related block, context classification prediction is performed on the syntax elements of the current block to obtain the classification category corresponding to the syntax elements of the current block; Based on the classification category corresponding to the syntax element of the current block, determine the context probability model corresponding to the syntax element of the current block; The current block is encoded based on the determined context probability model.

12. A video decoding device, characterized in that, include: The acquisition unit is configured to acquire the syntax elements of the temporal related blocks of the current block; The processing unit is configured to perform context classification prediction on the syntax elements of the current block based on the syntax elements of the temporally related block, so as to obtain the classification category corresponding to the syntax elements of the current block. The determining unit is configured to determine the context probability model corresponding to the syntax element of the current block based on the classification category corresponding to the syntax element of the current block; The decoding unit is configured to perform decoding processing on the current block based on the determined context probability model.

13. A video encoding device, characterized in that, include: The acquisition unit is configured to acquire the syntax elements of the temporal related blocks of the current block; The processing unit is configured to perform context classification prediction on the syntax elements of the current block based on the syntax elements of the temporally related block, so as to obtain the classification category corresponding to the syntax elements of the current block. The determining unit is configured to determine the context probability model corresponding to the syntax element of the current block based on the classification category corresponding to the syntax element of the current block; The encoding unit is configured to encode the current block based on the determined context probability model.

14. A computer-readable medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the method of any one of claims 1 to 11.

15. A computer device, characterized in that, include: One or more processors; A memory for storing one or more computer programs that, when executed by one or more processors, cause the computer device to perform the method of any one of claims 1 to 11.

16. A computer program product, characterized in that, The computer program product includes a computer program stored in a computer-readable storage medium, wherein a processor of a computer device reads from the computer-readable storage medium and executes the computer program, causing the computer device to perform the method of any one of claims 1 to 11.

17. A method for storing video streams, characterized in that, The video stream is decoded using the video decoding method according to any one of claims 1 to 10, or the video stream is generated using the video encoding method according to claim 11.