Method and apparatus for probability calculation for context-based adaptive binary arithmetic coding

By adopting a weighted multi-assumption probability update method and adaptive weight combination in CABAC, the probability estimation accuracy of video encoding and decoding is improved, the problem of insufficient CABAC accuracy is solved, and the video encoding and decoding efficiency is improved.

CN118975241APending Publication Date: 2024-11-15BEIJING DAJIA INTERNET INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202380027991.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Priority Date
2022-03-15
Filing Date
2023-03-15
Publication Date
2024-11-15

AI Technical Summary

Technical Problem

In the existing video encoding and decoding technology, the accuracy of the CABAC probability estimation module is insufficient, which affects the efficiency and quality of video encoding and decoding.

Method used

The weighted multi-hypothesis probability update method is used to calculate the probability of the binary bits through two adaptive parameters α0 and α1, and the adaptive weight ω is used to combine two probability estimators during the video encoding process to improve the accuracy of the probability estimation.

Benefits of technology

It improves the efficiency of CABAC technology, enhances the accuracy of estimating binary symbol probability of video signals, and improves the performance of video encoding and decoding.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118975241A_ABST
    Figure CN118975241A_ABST
Patent Text Reader

Abstract

Methods, apparatus, and non-transitory computer-readable storage media for video decoding and encoding are provided. In a method for video decoding, a binary arithmetic decoder may obtain a first probability for a binary symbol according to a first adaptation parameter, where the binary symbol is related to a given context model for the binary arithmetic decoder, and where the binary symbol is associated with the given context model for the binary arithmetic decoder. And the binary symbols are from a plurality of binary symbols associated with the context model. Further, the decoder may obtain a second probability for the binary symbol according to a second adaptation parameter, and then obtain a multi-hypothesis probability according to the first probability, the first adaptation weight, the second probability, and the second adaptation weight, where the multi-hypothesis probability determines a probability that the binary symbol equals the binary value. Further, the decoder may decode the binary symbols according to the multi-hypothesis probability.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] This application is based upon and claims the benefit of priority to U.S. Provisional Application No. 63 / 320,209, filed on March 15, 2021, entitled “Probability Computation for Context-Based Adaptive Binary Arithmetic Coding,” the entire contents of which are incorporated herein by reference for all purposes. Technical Field

[0002] The present disclosure relates to video coding and compression, and in particular, but not limited to, to methods and apparatus for improving the accuracy of a probability estimation module for context-based adaptive binary arithmetic coding (CABAC), which is an entropy coding method used in modern video codecs. Background Art

[0003] Various video coding techniques can be used to compress video data. Video coding is performed according to one or more video coding standards. For example, video coding standards include Versatile Video Codec (VVC), High Efficiency Video Codec (H.265 / HEVC), Advanced Video Codec (H.264 / AVC), Moving Picture Experts Group (MPEG) codec, etc. Video coding generally uses a prediction method (e.g., inter-frame prediction, intra-frame prediction, etc.) that exploits the redundancy present in a video image or sequence. An important goal of video coding techniques is to compress video data into a form that uses a lower bit rate while avoiding or minimizing the degradation of video quality.

[0004] The first version of the VVC standard was completed in July 2020, providing approximately 50% bitrate savings or equivalent perceptual quality compared to the previous generation video codec standard HEVC. Although the VVC standard provides significant codec improvements over its predecessor, there is evidence that better codec efficiency can be achieved with additional codec tools. Recently, the Joint Video Exploration Team (JVET), in collaboration with ITU-TVECG and ISO / IEC MPEG, began exploring advanced technologies that can achieve substantial enhancements in codec efficiency relative to VVC. In April 2021, a software code base called the Enhanced Compression Model (ECM) was established for future video codec exploration work. The ECM reference software is based on the VVC Test Model (VTM) developed by JVET for VVC, and further extends and / or improves several existing modules (e.g., intra / inter prediction, transform, loop filter, etc.). In the future, any new codec tools beyond the VVC standard will need to be integrated into the ECM platform and tested using the JVET Common Test Conditions (CTC). Summary of the invention

[0005] This disclosure provides examples of techniques related to improving the accuracy of a probability estimation module for CABAC.

[0006] According to a first aspect of the present disclosure, a method for video decoding is provided. The method includes: a binary arithmetic decoder can obtain a first probability for a binary symbol according to a first adaptive parameter, wherein the binary symbol is associated with a given context model for the binary arithmetic decoder, and the binary symbol comes from a plurality of binary symbols associated with the context model. In addition, the decoder can obtain a second probability for a binary symbol according to a second adaptive parameter, and then obtain a multi-hypothesis probability according to the first probability, the first adaptive weight, the second probability, and the second adaptive weight, wherein the multi-hypothesis probability determines the probability that a binary symbol is equal to a binary value. In addition, the decoder can decode a binary symbol according to the multi-hypothesis probability.

[0007] According to a second aspect of the present disclosure, a method for video encoding is provided. The method includes: a binary arithmetic encoder can obtain a first probability for a binary symbol according to a first adaptive parameter, wherein the binary symbol is associated with a given context model for the binary arithmetic encoder, and the binary symbol comes from a plurality of binary symbols associated with the context model. In addition, the encoder can obtain a second probability for a binary symbol according to a second adaptive parameter, and then obtain a multi-hypothesis probability according to the first probability, the first adaptive weight, the second probability, and the second adaptive weight, wherein the multi-hypothesis probability determines the probability that a binary symbol is equal to a binary value. In addition, the encoder can encode a binary symbol according to the multi-hypothesis probability.

[0008] According to a third aspect of the present disclosure, a method for video decoding is provided. The method includes: the decoder may select a fixed position from a slice that is encoded and decoded before a current slice, and in response to determining that decoding of a coding block covering the fixed position has been completed, obtain a stored context state by storing context states of one or more context models, and use the stored context state as an initial context state of a corresponding context model of one or more subsequent slices.

[0009] According to a fourth aspect of the present disclosure, a method for video encoding is provided. The method includes: the encoder may select a fixed position from a slice that is encoded and decoded before a current slice, and obtain a stored context state by storing context states of one or more context models, and use the stored context state as an initial context state of a corresponding context model of one or more subsequent slices.

[0010] According to a fifth aspect of the present disclosure, a device for video decoding is provided. The device includes one or more processors and a memory, the memory is coupled to the one or more processors and is configured to store instructions executable by the one or more processors, wherein the one or more processors are configured to perform the method according to the first aspect or the third aspect when executing the instructions.

[0011] According to a sixth aspect of the present disclosure, a device for video encoding is provided. The device includes one or more processors and a memory, the memory is coupled to the one or more processors and is configured to store instructions executable by the one or more processors, wherein the one or more processors are configured to perform the method according to the second aspect or the fourth aspect when executing the instructions.

[0012] According to a seventh aspect of the present disclosure, a non-temporary computer-readable storage medium for storing computer-executable instructions is provided, wherein the computer-executable instructions, when executed by one or more computer processors, cause the one or more computer processors to receive a bit stream and, based on the bit stream, execute a method according to the first aspect or the third aspect.

[0013] According to an eighth aspect of the present disclosure, a non-transitory computer-readable storage medium for storing computer-executable instructions is provided. When the computer-executable instructions are executed by one or more computer processors, the one or more computer processors execute the method according to the second aspect or the fourth aspect to encode a current slice into a bit stream and send the bit stream. BRIEF DESCRIPTION OF THE DRAWINGS

[0014] A more particular description of examples of the present disclosure will be presented by reference to specific examples shown in the accompanying drawings. Given that these drawings depict only some examples and are not therefore considered limiting in scope, the examples will be described and explained with additional specificity and detail through use of the accompanying drawings.

[0015] Figure 1A is a block diagram illustrating a system for encoding and decoding video blocks according to some examples of the present disclosure.

[0016] Figure 1B is a block diagram of an encoder according to some examples of the present disclosure.

[0017] Figure 1C to Figure 1F is a block diagram illustrating how a frame is recursively partitioned into multiple video blocks of different sizes and shapes according to some examples of the present disclosure.

[0018] Figure 1G is a block diagram illustrating an exemplary video encoder according to some examples of the present disclosure.

[0019] Figure 2A is a block diagram of a decoder according to some examples of the present disclosure.

[0020] Figure 2B is a block diagram illustrating an exemplary video decoder according to some examples of the present disclosure.

[0021] Figure 3A is a schematic diagram illustrating block partitioning in a multi-type tree structure according to some examples of the present disclosure.

[0022] Figure 3B is a schematic diagram illustrating block partitioning in a multi-type tree structure according to some examples of the present disclosure.

[0023] Figure 3C is a schematic diagram illustrating block partitioning in a multi-type tree structure according to some examples of the present disclosure.

[0024] Figure 3D is a schematic diagram illustrating block partitioning in a multi-type tree structure according to some examples of the present disclosure.

[0025] Figure 3E is a schematic diagram illustrating block partitioning in a multi-type tree structure according to some examples of the present disclosure.

[0026] Figure 4 is a schematic diagram illustrating a computing environment coupled with a user interface according to some examples of the present disclosure.

[0027] Figure 5 is a flowchart illustrating a method for video decoding according to some examples of the present disclosure.

[0028] Figure 6 is a diagram showing some examples according to the present disclosure. Figure 5 The method for video decoding shown in FIG. 1 corresponds to a flow chart of a method for video encoding.

[0029] Figure 7 is a flowchart illustrating a method for video decoding according to some examples of the present disclosure.

[0030] Figure 8 is a diagram showing some examples according to the present disclosure. Figure 7 The method for video decoding shown in FIG. 1 corresponds to a flow chart of a method for video encoding. DETAILED DESCRIPTION

[0031] Reference will now be made in detail to specific embodiments, examples of which are shown in the accompanying drawings. In the following detailed description, numerous non-limiting specific details are set forth to aid in understanding the subject matter presented herein. However, it will be apparent to one of ordinary skill in the art that various alternatives may be used. For example, it will be apparent to one of ordinary skill in the art that the subject matter presented herein may be implemented on many types of electronic devices having digital video capabilities.

[0032] The terms used in this disclosure are used only for the purpose of describing specific embodiments and are not intended to limit the disclosure. In this disclosure and the appended claims, singular forms are also intended to include plural forms, unless other meanings are clearly expressed throughout the disclosure. It will also be understood that the term "and / or" used in this disclosure refers to and includes one or any or all possible combinations of the listed multiple related items.

[0033] References throughout this specification to "one embodiment," "an embodiment," "an example," "some embodiments," "some examples," or similar language mean that the particular feature, structure, or characteristic being described is included in at least one embodiment or example. Unless explicitly stated otherwise, features, structures, elements, or characteristics described in conjunction with one or some embodiments are also applicable to other embodiments.

[0034] Throughout the disclosure, the terms "first", "second", "third", etc. are used as nomenclatures for referring to related elements (e.g., devices, components, compositions, steps, etc.) only, without implying any spatial or temporal order, unless otherwise explicitly stated. For example, "first device" and "second device" may refer to two separately formed devices, or two parts, components, or operating states of the same device, and may be named arbitrarily.

[0035] The terms "module", "sub-module", "circuit", "sub-circuit", "circuitry", "sub-circuitry", "unit", or "sub-unit" may include a memory (shared, dedicated, or group) storing code or instructions that can be executed by one or more processors. A module may include one or more circuits with or without stored code or instructions. A module or circuit may include one or more components connected directly or indirectly. These components may or may not be physically attached to or located adjacent to each other.

[0036] As used herein, the terms "if" or "when" may be understood to mean "on" or "in response to" depending on the context. These terms, if they appear in a claim, may not indicate that the associated limitation or feature is conditional or optional. For example, a method may include the following steps: i) when condition X exists or if condition X exists, perform function or action X', and ii) when condition Y exists or if condition Y exists, perform function or action Y'. The method may be implemented using both the ability to perform function or action X' and the ability to perform function or action Y'. Therefore, both functions X' and Y' may be performed at different times in multiple executions of the method.

[0037] A unit or module may be implemented purely by software, purely by hardware, or by a combination of hardware and software. In a pure software implementation, for example, a unit or module may include functionally related code blocks or software components that are linked together directly or indirectly to perform a specific function.

[0038] Figure 1A is a block diagram illustrating an exemplary system 10 for encoding and decoding video blocks in parallel according to some embodiments of the present disclosure. Figure 1A As shown in , system 10 includes a source device 12 that generates and encodes video data to be later decoded by a destination device 14. Source device 12 and destination device 14 may include any of a wide variety of electronic devices, including desktop or laptop computers, tablet computers, smart phones, set-top boxes, digital televisions, cameras, display devices, digital media players, video game consoles, video streaming devices, etc. In some implementations, source device 12 and destination device 14 are equipped with wireless communication capabilities.

[0039] In some embodiments, the target device 14 may receive the encoded video data to be decoded via the link 16. The link 16 may include any type of communication medium or device capable of moving the encoded video data from the source device 12 to the target device 14. In one example, the link 16 may include a communication medium that enables the source device 12 to directly send the encoded video data to the target device 14 in real time. The encoded video data may be modulated according to a communication standard (e.g., a wireless communication protocol) and sent to the target device 14. The communication medium may include any wireless or wired communication medium, such as a radio frequency (RF) spectrum or one or more physical transmission lines. The communication medium may form a portion of a packet-based network (e.g., a local area network, a wide area network, or a global network such as the Internet). The communication medium may include a router, a switch, a base station, or any other device that may be beneficial to facilitate communication from the source device 12 to the target device 14.

[0040] In some other embodiments, the encoded video data may be sent from the output interface 22 to the storage device 32. The encoded video data in the storage device 32 may then be accessed by the target device 14 via the input interface 28. The storage device 32 may include any of a variety of distributed or locally accessed data storage media, such as a hard drive, a Blu-ray disc, a digital versatile disc (DVD), a compact disc read-only memory (CD-ROM), a flash memory, a volatile or non-volatile memory, or any other suitable digital storage medium for storing encoded video data. In another example, the storage device 32 may correspond to a file server or another intermediate storage device that may hold the encoded video data generated by the source device 12. The target device 14 may access the stored video data from the storage device 32 via streaming or downloading. The file server may be any type of computer capable of storing encoded video data and sending the encoded video data to the target device 14. Exemplary file servers include a network server (e.g., for a website), a file transfer protocol (FTP) server, a network attached storage (NAS) device, or a local disk drive. Target device 14 may access the encoded video data through any standard data connection suitable for accessing encoded video data stored on a file server, including a wireless channel (e.g., a Wireless Fidelity (Wi-Fi) connection), a wired connection (e.g., a Digital Subscriber Line (DSL), a cable modem, etc.), or a combination of both wireless channels and wired connections. The transmission of the encoded video data from storage device 32 may be a streaming transmission, a download transmission, or a combination of both streaming and download transmissions.

[0041] like Figure 1A As shown in , source device 12 includes video source 18, video encoder 20 and output interface 22. Video source 18 may include sources such as or a combination of such sources: a video capture device (e.g., a camera), a video archive containing previously captured video, a video feed interface for receiving video from a video content provider, and / or a computer graphics system for generating computer graphics data as source video. As an example, if video source 18 is a camera of a security monitoring system, source device 12 and target device 14 may form a camera phone or a video phone. However, the embodiments described in this application may be generally applicable to video encoding and decoding, and may be applied to wireless and / or wired applications.

[0042] The captured, pre-captured, or computer-generated video may be encoded by the video encoder 20. The encoded video data may be sent directly to the target device 14 via the output interface 22 of the source device 12. The encoded video data may also (or alternatively) be stored on a storage device 32 for later access by the target device 14 or other device for decoding and / or playback. The output interface 22 may further include a modem and / or a transmitter.

[0043] Target device 14 includes input interface 28, video decoder 30, and display device 34. Input interface 28 may include a receiver and / or a modem and receives encoded video data via link 16. The encoded video data transmitted via link 16 or provided on storage device 32 may include various syntax elements generated by video encoder 20 for use by video decoder 30 in decoding the video data. Such syntax elements may be included within the encoded video data sent over a communication medium, stored on a storage medium, or stored on a file server.

[0044] In some implementations, the target device 14 may include a display device 34, which may be an integrated display device and an external display device configured to communicate with the target device 14. The display device 34 displays the decoded video data to a user and may include any of a variety of display devices, such as a liquid crystal display (LCD), a plasma display, an organic light emitting diode (OLED) display, or another type of display device.

[0045] The video encoder 20 and the video decoder 30 can operate according to a proprietary standard or an industry standard (e.g., VVC, HEVC, Part 10 of MPEG-4, AVC) or an extension of such a standard. It should be understood that the present application is not limited to a specific video encoding / decoding standard and can be applied to other video encoding / decoding standards. It is generally believed that the video encoder 20 of the source device 12 can be configured to encode the video data according to any of these current standards or future standards. Similarly, it is also generally believed that the video decoder 30 of the target device 14 can be configured to decode the video data according to any of these current standards or future standards.

[0046] The video encoder 20 and the video decoder 30 may be implemented as any of a variety of suitable encoder and / or decoder circuits, such as one or more microprocessors, digital signal processors (DSPs), application specific integrated circuits (ASICs), field programmable gate arrays (FPGAs), discrete logic devices, software, hardware, firmware, or any combination thereof. When partially implemented in software, the electronic device may store instructions for the software in a suitable non-transitory computer-readable medium, and use one or more processors to execute the instructions in the hardware to perform the video encoding / decoding operations disclosed in the present disclosure. Each of the video encoder 20 and the video decoder 30 may be included in one or more encoders or decoders, and either of the encoders or decoders may be integrated as part of a combined encoder / decoder (CODEC) in the corresponding device.

[0047] Like HEVC, VVC is built on a block-based hybrid video codec framework. Figure 1B 1 is a block diagram illustrating a block-based video encoder according to some embodiments of the present disclosure. In the encoder 100, the input video signal is processed block by block (referred to as a coding unit (CU)). The encoder 100 may be as follows: Figure 1A The video encoder 20 shown in . In VTM-1.0, a CU can be up to 128×128 pixels. However, unlike HEVC, which is based only on quadtree partition blocks, in VVC, a coding tree unit (CTU) is split into CUs based on quadtree / binary tree / ternary tree to adapt to changing local characteristics. In addition, the concept of multiple partition unit types in HEVC is removed, that is, the distinction between CU, prediction unit (PU) and transform unit (TU) no longer exists in VVC; instead, each CU is always used as a basic unit for both prediction and transformation without further partitioning. In the multi-type tree structure, a CTU is first partitioned by a quadtree structure. Then, each quadtree leaf node can be further partitioned by a binary tree structure and a ternary tree structure.

[0048] FIG. 3A to FIG. 3E is a schematic diagram illustrating multiple types of tree splitting modes according to some embodiments of the present disclosure. FIG. 3A to FIG. 3E Five split types are shown, including four-way split ( Figure 3A ), vertical binary segmentation ( Figure 3B ), horizontal binary segmentation ( Figure 3C ), vertical ternary segmentation ( Figure 3D ) and horizontal ternary segmentation ( Figure 3E ).

[0049] For each given video block, spatial prediction and / or temporal prediction may be performed. Spatial prediction (or "intra-frame prediction") uses pixels from samples of neighboring blocks that have been coded (which are called reference samples) in the same video picture / slice to predict the current video block. Spatial prediction reduces the spatial redundancy inherent in video signals. Temporal prediction (also known as "inter-frame prediction" or "motion compensated prediction") uses reconstructed pixels from coded video pictures to predict the current video block. Temporal prediction reduces the temporal redundancy inherent in video signals. The temporal prediction signal for a given CU is typically signaled by one or more motion vectors (MVs) that indicate the amount and direction of motion between the current CU and its temporal reference. In addition, if multiple reference pictures are supported, a reference picture index is additionally sent to identify which reference picture in the reference picture storage the temporal prediction signal comes from.

[0050] After spatial and / or temporal prediction, an intra / inter mode decision circuit 121 in the encoder 100 selects the best prediction mode, for example based on a rate-distortion optimization method. The block prediction factor 120 is then subtracted from the current video block and the resulting prediction residual is decorrelated using the transform circuit 102 and the quantization circuit 104. The resulting quantized residual coefficients are dequantized by the dequantization circuit 116 and inversely transformed by the inverse transform circuit 118 to form a reconstructed residual, which is then added back to the prediction block to form a reconstructed signal for the CU. In addition, before the reconstructed CU is placed in the reference picture storage of the picture buffer 117 and used to encode future video blocks, loop filtering 115, such as a deblocking filter, sample adaptive offset (SAO) and / or adaptive loop filter (ALF), may be applied to the reconstructed CU. In order to form an output video bitstream 114, the coding mode (inter or intra), prediction mode information, motion information, and quantized residual coefficients are all sent to the entropy coding unit 106 to be further compressed and packaged to form a bitstream.

[0051] For example, deblocking filters are available in the current versions of AVC, HEVC, and VVC. In HEVC, an additional loop filter called SAO is defined to further improve the coding efficiency. In the current version of the VVC standard, another loop filter called ALF is being actively studied and is likely to be included in the final standard.

[0052] These loop filter operations are optional. Performing these operations helps improve coding efficiency and visual quality. They can also be turned off as a decision presented by the encoder 100 to save computational complexity.

[0053] It should be noted that intra prediction is usually based on unfiltered reconstructed pixels, whereas inter prediction is based on filtered reconstructed pixels if these filter options are turned on by the encoder 100 .

[0054] Figure 2A is a block diagram illustrating a block-based video decoder 200 that can be used in conjunction with many video codec standards. The decoder 200 is similar to the one residing in Figure 1B The block-based video decoder 200 may be as follows: Figure 1A . In the decoder 200, the input video bitstream 201 is first decoded by entropy decoding 202 to derive quantization coefficient levels and prediction related information. The quantization coefficient levels are then processed by inverse quantization 204 and inverse transform 206 to obtain reconstructed prediction residuals. The block predictor mechanism implemented in the intra / inter mode selector 212 is configured to perform intra prediction 208 or motion compensation 210 based on the decoded prediction information. A set of unfiltered reconstructed pixels is obtained by summing the reconstructed prediction residuals from the inverse transform 206 and the prediction output generated by the block predictor mechanism using an adder 214.

[0055] The reconstructed block may be further passed through a loop filter 209 before it is stored in a picture buffer 213 used as a reference picture storage. The reconstructed video in the picture buffer 213 may be sent to drive a display device, as well as used to predict future video blocks. With the loop filter 209 turned on, a filtering operation is performed on these reconstructed pixels to derive a final reconstructed video output 222.

[0056] Figure 1G is a block diagram illustrating an exemplary video encoder 20 according to some embodiments described in the present application. The video encoder 20 can perform intra-frame prediction coding and inter-frame prediction coding on video blocks within a video frame. Intra-frame prediction coding relies on spatial prediction to reduce or remove spatial redundancy in video data within a given video frame or picture. Inter-frame prediction coding relies on temporal prediction to reduce or remove temporal redundancy in video data within adjacent video frames or pictures of a video sequence. It should be noted that in the field of video coding and decoding, the term "frame" can be used as a synonym for the term "image" or "picture".

[0057] like Figure 1GAs shown in , the video encoder 20 includes a video data memory 40, a prediction processing unit 41, a decoded picture buffer (DPB) 64, an adder 50, a transform processing unit 52, a quantization unit 54, and an entropy coding unit 56. The prediction processing unit 41 further includes a motion estimation unit 42, a motion compensation unit 44, a segmentation unit 45, an intra-frame prediction processing unit 46, and an intra-frame block copy (BC) unit 48. In some embodiments, the video encoder 20 also includes an inverse quantization unit 58, an inverse transform processing unit 60, and an adder 62 for video block reconstruction. A loop filter 63 such as a deblocking filter can be located between the adder 62 and the DPB 64 to filter the block boundary to remove the block effect from the reconstructed video. In addition to the deblocking filter, another loop filter (e.g., a sample adaptive offset (SAO) filter and / or an adaptive loop filter (ALF)) can also be used to filter the output of the adder 62. In some examples, the loop filter can be omitted, and the decoded video block can be directly provided to the DPB 64 by the adder 62. Video encoder 20 may take the form of a fixed or programmable hardware unit, or may be distributed among one or more of the illustrated fixed or programmable hardware units.

[0058] Video data memory 40 may store video data to be encoded by components of video encoder 20. Figure 1A The video source 18 shown obtains video data in the video data memory 40. The DPB 64 is a buffer that stores reference video data (e.g., reference frames or pictures) for use by the video encoder 20 (e.g., in intra-frame or inter-frame prediction coding mode) when encoding the video data. The video data memory 40 and the DPB 64 can be formed by any of a variety of memory devices. In various examples, the video data memory 40 can be on-chip with other components of the video encoder 20, or off-chip relative to those components.

[0059] like Figure 1GAs shown in , after receiving the video data, the segmentation unit 45 within the prediction processing unit 41 segments the video data into video blocks. This segmentation may also include segmenting the video frame into strips, tiles (e.g., a set of video blocks) or other larger coding units (CUs) according to a predefined splitting structure (e.g., a quadtree (QT) structure) associated with the video data. A video frame is or may be considered as a two-dimensional sample array or matrix with sample values. The samples in the array may also be referred to as pixels or picture elements (pel). The number of samples in the horizontal and vertical directions (or axes) of the array or picture defines the size and / or resolution of the video frame. For example, a video frame may be divided into a plurality of video blocks by using QT segmentation. A video block is again or may be considered as a two-dimensional sample array or matrix with sample values, but its dimensions are smaller than the dimensions of a video frame. The number of samples in the horizontal and vertical directions (or axes) of a video block defines the size of the video block. By, for example, iteratively using QT segmentation, binary tree (BT) segmentation, or ternary tree (TT) segmentation, or any combination thereof, a video block may be further segmented into one or more block partitions or sub-blocks (which may again form blocks). It should be noted that the term "block" or "video block" used herein may be a portion of a frame or picture, in particular a rectangular (square or non-square) portion. With reference to, for example, HEVC and VVC, a block or video block may be or correspond to a coding tree unit (CTU), a CU, a prediction unit (PU) or a transform unit (TU) and / or may be or correspond to a corresponding block (e.g., a coding tree block (CTB), a coding block (CB), a prediction block (PB) or a transform block (TB)) and / or a sub-block.

[0060] The prediction processing unit 41 may select one of a plurality of feasible prediction coding modes for the current video block based on the error results (e.g., coding rate and distortion level), such as one of one or more inter-frame prediction coding modes in a plurality of intra-frame prediction coding modes. The prediction processing unit 41 may provide the resulting intra-frame prediction coding block or inter-frame prediction coding block to the adder 50 to generate a residual block, and to the adder 62 to reconstruct the coding block for subsequent use as part of a reference frame. The prediction processing unit 41 also provides syntax elements (e.g., motion vectors, intra-frame mode indicators, partition information, and other such syntax information) to the entropy coding unit 56.

[0061] To select an appropriate intra-prediction coding mode for the current video block, intra-prediction processing unit 46 within prediction processing unit 41 may perform intra-prediction coding of the current video block in relation to one or more neighboring blocks in the same frame as the current block to be encoded to provide spatial prediction. Motion estimation unit 42 and motion compensation unit 44 within prediction processing unit 41 may perform inter-prediction coding of the current video block in relation to one or more prediction blocks in one or more reference frames to provide temporal prediction. Video encoder 20 may perform multiple encoding passes, for example, to select an appropriate coding mode for each block of video data.

[0062] In some embodiments, motion estimation unit 42 determines an inter-prediction mode for a current video frame by generating a motion vector according to a predetermined pattern within a sequence of video frames, the motion vector indicating the displacement of a video block within the current video frame relative to a prediction block within a reference video frame. Motion estimation performed by motion estimation unit 42 is the process of generating a motion vector that estimates the motion of a video block. For example, a motion vector may indicate the displacement of a video block within a current video frame or picture relative to a prediction block within a reference frame associated with a current block being encoded within the current frame. The predetermined pattern may designate a video frame in a sequence as a P frame or a B frame. Intra BC unit 48 may determine a vector (e.g., a block vector) for intra BC coding in a manner similar to the motion vector determined by motion estimation unit 42 for inter prediction, or may utilize motion estimation unit 42 to determine a block vector.

[0063] In terms of pixel differences, the prediction block for the video block may be or may correspond to a block or reference block of a reference frame that is considered to closely match the video block to be encoded, and the pixel difference may be determined by the sum of absolute differences (SAD), the sum of squared differences (SSD), or other difference metrics. In some embodiments, the video encoder 20 may calculate values ​​for sub-integer pixel positions of the reference frames stored in the DPB 64. For example, the video encoder 20 may interpolate values ​​for quarter-pixel positions, eighth-pixel positions, or other fractional pixel positions of the reference frame. Thus, the motion estimation unit 42 may perform a motion search relative to full pixel positions and fractional pixel positions and output a motion vector with fractional pixel accuracy.

[0064] Motion estimation unit 42 calculates a motion vector for a video block in an inter-prediction coded frame by comparing the position of the video block to the position of a prediction block of a reference frame selected from a first reference frame list (list 0) or a second reference frame list (list 1), each of which identifies one or more reference frames stored in DPB 64. Motion estimation unit 42 sends the calculated motion vector to motion compensation unit 44 and then to entropy encoding unit 56.

[0065] The motion compensation performed by the motion compensation unit 44 may involve obtaining or generating a prediction block based on the motion vector determined by the motion estimation unit 42. After receiving the motion vector for the current video block, the motion compensation unit 44 may locate the prediction block pointed to by the motion vector in one of the reference frame lists, retrieve the prediction block from the DPB 64, and forward the prediction block to the adder 50. The adder 50 then forms a residual video block of pixel difference values ​​by subtracting the pixel values ​​of the prediction block provided by the motion compensation unit 44 from the pixel values ​​of the current video block being encoded. The pixel difference values ​​forming the residual video block may include luminance component differences or chrominance component differences or both. The motion compensation unit 44 may also generate syntax elements associated with the video block of the video frame for use by the video decoder 30 when decoding the video block of the video frame. The syntax elements may include, for example, syntax elements defining motion vectors for identifying prediction blocks, any flags indicating prediction modes, or any other syntax information described herein. It should be noted that the motion estimation unit 42 and the motion compensation unit 44 may be highly integrated, but are described separately for conceptual purposes.

[0066] In some embodiments, the intra BC unit 48 may generate vectors and obtain prediction blocks in a manner similar to that described above in conjunction with the motion estimation unit 42 and the motion compensation unit 44, but these prediction blocks are in the same frame as the current block being encoded, and these vectors are referred to as block vectors rather than motion vectors. Specifically, the intra BC unit 48 may determine the intra prediction mode to be used to encode the current block. In some examples, the intra BC unit 48 may encode the current block using various intra prediction modes, for example, during separate encoding passes, and test their performance through rate-distortion analysis. Next, the intra BC unit 48 may select a suitable intra prediction mode to use among the various tested intra prediction modes and generate an intra mode indicator accordingly. For example, the intra BC unit 48 may calculate rate-distortion values ​​for the various tested intra prediction modes using rate-distortion analysis, and select an intra prediction mode with the best rate-distortion characteristic among the tested modes as a suitable intra prediction mode to use. The rate-distortion analysis generally determines the amount of distortion (or error) between a coded block and the original uncoded block that was encoded to produce the coded block, as well as the bit rate (i.e., the number of bits) used to produce the coded block. Intra BC unit 48 may calculate ratios based on the distortion and rate for the various coded blocks to determine which intra-prediction mode exhibits the best rate-distortion value for the block.

[0067] In other examples, intra BC unit 48 may use, in whole or in part, motion estimation unit 42 and motion compensation unit 44 to perform such functions for intra BC prediction in accordance with embodiments described herein. In either case, for intra block copying, the prediction block may be a block that is considered to closely match the block to be encoded in terms of pixel differences, which may be determined by SAD, SSD, or other difference metrics, and identifying the prediction block may include calculating values ​​for sub-integer pixel positions.

[0068] Regardless of whether the prediction block is from the same frame according to intra-frame prediction or from a different frame according to inter-frame prediction, the video encoder 20 can form a residual video block by subtracting the pixel values ​​of the prediction block from the pixel values ​​of the current video block being encoded. The pixel difference values ​​forming the residual video block may include both luma component differences and chroma component differences.

[0069] As an alternative to the inter-frame prediction performed by the motion estimation unit 42 and the motion compensation unit 44 or the intra-frame block copy prediction performed by the intra BC unit 48 as described above, the intra-frame prediction processing unit 46 can perform intra-frame prediction on the current video block. Specifically, the intra-frame prediction processing unit 46 can determine the intra-frame prediction mode for encoding the current block. To this end, the intra-frame prediction processing unit 46 can use various intra-frame prediction modes to encode the current block, for example, during separate encoding passes, and the intra-frame prediction processing unit 46 (or in some examples, the mode selection unit) can select a suitable intra-frame prediction mode from the tested intra-frame prediction modes to use. The intra-frame prediction processing unit 46 can provide information indicating the intra-frame prediction mode selected for the block to the entropy coding unit 56. The entropy coding unit 56 can encode the information indicating the selected intra-frame prediction mode into the bitstream.

[0070] After prediction processing unit 41 determines a prediction block for the current video block via inter-prediction or intra-prediction, adder 50 forms a residual video block by subtracting the prediction block from the current video block. The residual video data in the residual block may be included in one or more TUs and provided to transform processing unit 52. Transform processing unit 52 transforms the residual video data into residual transform coefficients using a transform (e.g., a discrete cosine transform (DCT) or a conceptually similar transform).

[0071] The transform processing unit 52 may send the resulting transform coefficients to a quantization unit 54. The quantization unit 54 quantizes the transform coefficients to further reduce the bit rate. The quantization process may also reduce the bit depth associated with some or all of the coefficients. The degree of quantization may be modified by adjusting a quantization parameter. In some examples, the quantization unit 54 may then perform a scan on the matrix including the quantized transform coefficients. Alternatively, the entropy coding unit 56 may perform the scan.

[0072] After quantization, entropy coding unit 56 entropy encodes the quantized transform coefficients into a video bitstream using, for example, context adaptive variable length coding (CAVLC), context adaptive binary arithmetic coding (CABAC), syntax-based context adaptive binary arithmetic coding (SBAC), probability interval partitioning entropy (PIPE) coding, or another entropy coding method or technique. The encoded bitstream may then be sent to a video bitstream such as a Figure 1A The video decoder 30 shown, or archived as Figure 1A The video frame may be stored in storage device 32 as shown for later transmission to or retrieval by video decoder 30. Entropy encoding unit 56 may also entropy encode motion vectors and other syntax elements for the current video frame being encoded.

[0073] Inverse quantization unit 58 and inverse transform processing unit 60 apply inverse quantization and inverse transform, respectively, to reconstruct the residual video block in the pixel domain for use in generating reference blocks for predicting other video blocks. As noted above, motion compensation unit 44 may generate a motion compensated prediction block from one or more reference blocks of a frame stored in DPB 64. Motion compensation unit 44 may also apply one or more interpolation filters to the prediction block to calculate sub-integer pixel values ​​for use in motion estimation.

[0074] Adder 62 adds the reconstructed residual block to the motion compensated prediction block generated by motion compensation unit 44 to generate a reference block for storage in DPB 64. The reference block may then be used as a prediction block by intra BC unit 48, motion estimation unit 42, and motion compensation unit 44 to inter-predict another video block in a subsequent video frame.

[0075] Figure 2B 1 is a block diagram showing another exemplary video decoder 30 according to some embodiments of the present application. The video decoder 30 includes a video data memory 79, an entropy decoding unit 80, a prediction processing unit 81, an inverse quantization unit 86, an inverse transform processing unit 88, an adder 90, and a DPB 92. The prediction processing unit 81 further includes a motion compensation unit 82, an intra-frame prediction unit 84, and an intra-frame BC unit 85. The video decoder 30 may perform the above-mentioned operations in combination with the above-mentioned operations. Figure 1G The encoding process is substantially the inverse of the decoding process described with respect to video encoder 20. For example, motion compensation unit 82 may generate prediction data based on motion vectors received from entropy decoding unit 80, and intra-prediction unit 84 may generate prediction data based on intra-prediction mode indicators received from entropy decoding unit 80.

[0076] In some examples, units of the video decoder 30 may be tasked to perform embodiments of the present application. In addition, in some examples, embodiments of the present disclosure may be dispersed in one or more of the units of the video decoder 30. For example, the intra BC unit 85 may perform embodiments of the present application alone or in combination with other units of the video decoder 30 (e.g., the motion compensation unit 82, the intra prediction unit 84, and the entropy decoding unit 80). In some examples, the video decoder 30 may not include the intra BC unit 85, and the functions of the intra BC unit 85 may be performed by other components of the prediction processing unit 81 (e.g., the motion compensation unit 82).

[0077] The video data memory 79 may store video data, such as an encoded video bitstream, to be decoded by other components of the video decoder 30. The video data stored in the video data memory 79 may be obtained, for example, from the storage device 32, from a local video source (e.g., a camera), via a wired or wireless network communication of video data, or by accessing a physical data storage medium (e.g., a flash drive or hard disk). The video data memory 79 may include a coded picture buffer (CPB) that stores encoded video data from an encoded video bitstream. The DPB 92 of the video decoder 30 stores reference video data for use by the video decoder 30 when decoding the video data (e.g., in an intra-frame or inter-frame prediction coding mode). The video data memory 79 and the DPB 92 may be formed by any of a variety of memory devices, such as dynamic random access memory (DRAM) (including synchronous DRAM (SDRAM)), magnetoresistive RAM (MRAM), resistive RAM (RRAM), or other types of memory devices. For illustrative purposes, the video data memory 79 and the DPB 92 are shown in FIG. Figure 2B 9 as two different components of the video decoder 30. However, it will be apparent to those skilled in the art that the video data memory 79 and the DPB 92 can be provided by the same memory device or separate memory devices. In some examples, the video data memory 79 can be on-chip with other components of the video decoder 30, or off-chip relative to those components.

[0078] During the decoding process, the video decoder 30 receives an encoded video bitstream representing video blocks of an encoded video frame and associated syntax elements. The video decoder 30 may receive syntax elements at the video frame level and / or the video block level. The entropy decoding unit 80 of the video decoder 30 entropy decodes the bitstream to generate quantization coefficients, motion vectors or intra-frame prediction mode indicators, and other syntax elements. The entropy decoding unit 80 then forwards the motion vectors or intra-frame prediction mode indicators, and other syntax elements to the prediction processing unit 81.

[0079] When a video frame is encoded as an intra-prediction coded (I) frame or for intra-coded prediction blocks in other types of frames, the intra-prediction unit 84 of the prediction processing unit 81 can generate prediction data for a video block of the current video frame based on the intra-prediction mode transmitted by the signal and reference data from a previously decoded block of the current frame.

[0080] When the video frame is encoded as an inter-frame prediction coding (i.e., B or P) frame, the motion compensation unit 82 of the prediction processing unit 81 generates one or more prediction blocks for the video block of the current video frame based on the motion vector and other syntax elements received from the entropy decoding unit 80. Each of the prediction blocks can be generated from a reference frame in one of the reference frame lists. The video decoder 30 can construct the reference frame lists, i.e., List 0 and List 1, based on the reference frames stored in the DPB 92 using a default construction technique.

[0081] In some examples, when a video block is encoded according to the intra BC mode described herein, intra BC unit 85 of prediction processing unit 81 generates a prediction block for the current video block based on the block vector and other syntax elements received from entropy decoding unit 80. The prediction block may be within a reconstructed region of the same picture as the current video block as defined by video encoder 20.

[0082] The motion compensation unit 82 and / or the intra BC unit 85 determine prediction information for a video block of the current video frame by parsing the motion vector and other syntax elements, and then use the prediction information to generate a prediction block for the current video block being decoded. For example, the motion compensation unit 82 uses some of the received syntax elements to determine a prediction mode (e.g., intra prediction or inter prediction) for encoding a video block of a video frame, an inter prediction frame type (e.g., B or P), construction information for one or more of the reference frame lists for the frame, motion vectors for each inter prediction encoded video block of the frame, inter prediction states for each inter prediction encoded video block of the frame, and other information for decoding a video block in the current video frame.

[0083] Similarly, the intra BC unit 85 may use some of the received syntax elements, such as flags, to determine whether the current video block is predicted using intra BC mode, construction information of which video blocks of the frame are within the reconstruction region and should be stored in the DPB 92, block vectors for each intra BC predicted video block of the frame, intra BC prediction status for each intra BC predicted video block of the frame, and other information for decoding the video block in the current video frame.

[0084] Motion compensation unit 82 may also perform interpolation using interpolation filters as used by video encoder 20 during encoding of the video blocks to calculate interpolated values ​​for sub-integer pixels of reference blocks. In this case, motion compensation unit 82 may determine the interpolation filters used by video encoder 20 based on the received syntax elements and use these interpolation filters to produce the prediction blocks.

[0085] Inverse quantization unit 86 inverse quantizes the quantized transform coefficients provided in the bitstream and entropy decoded by entropy decoding unit 80, using the same quantization parameters calculated by video encoder 20 for each video block in the video frame to determine the degree of quantization. Inverse transform processing unit 88 applies an inverse transform (e.g., an inverse DCT, an inverse integer transform, or a conceptually similar inverse transform process) to the transform coefficients to reconstruct the residual block in the pixel domain.

[0086] After the motion compensation unit 82 or the intra BC unit 85 generates a prediction block for the current video block based on the vector and other syntax elements, the adder 90 reconstructs the decoded video block for the current video block by adding the residual block from the inverse transform processing unit 88 to the corresponding prediction block generated by the motion compensation unit 82 and the intra BC unit 85. A loop filter 91 (e.g., a deblocking filter, an SAO filter, and / or an ALF) may be located between the adder 90 and the DPB 92 to further process the decoded video block. In some examples, the loop filter 91 may be omitted, and the decoded video block may be provided directly to the DPB 92 by the adder 90. The decoded video blocks in a given frame are then stored in the DPB 92, which stores reference frames for subsequent motion compensation of the next video block. The DPB 92 or a memory device separate from the DPB 92 may also store the decoded video for later presentation on a display device (e.g., Figure 1A on a display device 34).

[0087] In the current VVC and AVS3 standards, the motion information of the current coding block is copied from the spatial or temporal neighboring blocks specified by the merge candidate index, or the motion information of the current coding block is obtained through explicit signaling of motion estimation. The focus of the present disclosure is to improve the accuracy of the motion vector used for the affine merge mode by improving the derivation method of the affine merge candidate. For the convenience of describing the present disclosure, the existing affine merge mode design in the VVC standard is used as an example to illustrate the proposed ideas. Please note that although the existing affine mode design in the VVC standard is used as an example throughout the present disclosure, for technicians in the field of modern video coding and decoding technology, the proposed technology can also be applied to different designs of affine motion prediction modes or other coding and decoding tools with the same or similar design spirit.

[0088] In a typical video encoding process, a video sequence typically includes an ordered set of frames or pictures. Each frame may include three sample arrays, denoted as SL, SCb, and SCr. SL is a two-dimensional array of luma samples. SCb is a two-dimensional array of Cb chroma samples. SCr is a two-dimensional array of Cr chroma samples. In other examples, a frame may be monochrome and therefore include only a two-dimensional array of luma samples.

[0089] like Figure 1C As shown in , the video encoder 20 (or more specifically, the segmentation unit of the pre-processing unit of the video encoder 20) generates an encoded representation of a frame by first segmenting the frame into a set of CTUs. A video frame may include an integer number of CTUs sequentially ordered from left to right and from top to bottom in a raster scan order. Each CTU is the largest logical coding unit, and the width and height of the CTU are signaled by the video encoder 20 in a sequence parameter set so that all CTUs in a video sequence have the same size, one of 128×128, 64×64, 32×32, and 16×16. It should be noted, however, that the present application is not necessarily limited to a particular size. As Figure 1D As shown in , each CTU may include one CTB for luma samples, two corresponding coding tree blocks for chroma samples, and syntax elements for encoding samples of the coding tree blocks. The syntax elements describe the properties of different types of units of the coding pixel blocks and how the video sequence can be reconstructed at the video decoder 30, including inter-frame prediction or intra-frame prediction, intra-frame prediction mode, motion vectors, and other parameters. In a monochrome picture or a picture with three separate color planes, a CTU may include a single coding tree block and syntax elements for encoding samples of the coding tree block. The coding tree block may be an N×N block of samples.

[0090] To achieve better performance, the video encoder 20 may recursively perform tree partitioning, such as binary tree partitioning, ternary tree partitioning, quadtree partitioning, or a combination thereof, on the coding tree block of the CTU and divide the CTU into smaller CUs. Figure 1E As depicted in , a 64×64 CTU 400 is first divided into four smaller CUs, each CU having a block size of 32×32. Among the four smaller CUs, CU 410 and CU 420 are respectively divided into four CUs with a block size of 16×16. Two 16×16 CUs 430 and CU 440 are further divided into four CUs with a block size of 8×8. Figure 1F Depicted is a diagram showing Figure 1E The quadtree data structure of the final result of the partitioning process of the CTU 400 depicted in FIG. 4 corresponds to a CU of a corresponding size ranging from 32×32 to 8×8. Figure 1DIn the CTU depicted in FIG, each CU may include a CB of luma samples and two corresponding coding blocks of chroma samples of the same size frame, and syntax elements for encoding the samples of the coding blocks. In a monochrome picture or a picture with three separate color planes, a CU may include a single coding block and syntax structures for encoding the samples of the coding block. It should be noted that Figure 1E and Figure 1F The quadtree partitioning depicted in FIG is for illustrative purposes only, and one CTU can be split into multiple CUs based on quadtree partitioning / ternary tree partitioning / binary tree partitioning to adapt to varying local characteristics. In a multi-type tree structure, one CTU is partitioned according to a quadtree structure, and each quadtree leaf CU can be further partitioned according to a binary and ternary tree structure. FIG. 3A to FIG. 3E As shown, there are five possible partitioning types for a coding block with width W and height H, namely, quadruple partitioning, horizontal binary partitioning, vertical binary partitioning, horizontal ternary partitioning, and vertical ternary partitioning.

[0091] In some embodiments, the video encoder 20 may further partition the coding block of the CU into one or more (M×N) PBs. A PB is a rectangular (square or non-square) sample block to which the same prediction (inter or intra) is applied. The PU of a CU may include a PB of luma samples, two corresponding PBs of chroma samples, and syntax elements for predicting the PBs. In a monochrome picture or a picture with three separate color planes, a PU may include a single PB and a syntax structure for predicting the PB. The video encoder 20 may generate a predicted luma block, a predicted Cb block, and a predicted Cr block for the luma PB, Cb PB, and Cr PB of each PU of the CU.

[0092] Video encoder 20 may use intra prediction or inter prediction to generate a prediction block for a PU. If video encoder 20 uses intra prediction to generate a prediction block for a PU, video encoder 20 may generate the prediction block for the PU based on decoded samples of a frame associated with the PU. If video encoder 20 uses inter prediction to generate a prediction block for a PU, video encoder 20 may generate the prediction block for the PU based on decoded samples of one or more frames other than the frame associated with the PU.

[0093] After the video encoder 20 generates a predicted luma block, a predicted Cb block, and a predicted Cr block for one or more PUs of a CU, the video encoder 20 may generate a luma residual block for the CU by subtracting the predicted luma block of the CU from the original luma coding block of the CU, so that each sample in the luma residual block of the CU indicates the difference between a luma sample in one of the predicted luma blocks of the CU and a corresponding sample in the original luma coding block of the CU. Similarly, the video encoder 20 may generate a Cb residual block and a Cr residual block for the CU, respectively, so that each sample in the Cb residual block of the CU indicates the difference between a Cb sample in one of the predicted Cb blocks of the CU and a corresponding sample in the original Cb coding block of the CU, and each sample in the Cr residual block of the CU may indicate the difference between a Cr sample in one of the predicted Cr blocks of the CU and a corresponding sample in the original Cr coding block of the CU.

[0094] In addition, if Figure 1E As shown in , the video encoder 20 can use quadtree partitioning to decompose the luma residual block, Cb residual block and Cr residual block of the CU into one or more luma transform blocks, Cb transform blocks and Cr transform blocks, respectively. A transform block is a rectangular (square or non-square) sample block to which the same transform is applied. The TU of the CU may include a transform block of luma samples, two corresponding transform blocks of chroma samples, and syntax elements for transforming the transform block samples. Therefore, each TU of the CU may be associated with a luma transform block, a Cb transform block and a Cr transform block. In some examples, the luma transform block associated with the TU may be a sub-block of the luma residual block of the CU. The Cb transform block may be a sub-block of the Cb residual block of the CU. The Cr transform block may be a sub-block of the Cr residual block of the CU. In a monochrome picture or a picture with three separate color planes, a TU may include a single transform block and a syntax structure for transforming the samples of the transform block.

[0095] The video encoder 20 may apply one or more transforms to the luma transform block of the TU to generate a luma coefficient block for the TU. The coefficient block may be a two-dimensional array of transform coefficients. The transform coefficient may be a scalar. The video encoder 20 may apply one or more transforms to the Cb transform block of the TU to generate a Cb coefficient block for the TU. The video encoder 20 may apply one or more transforms to the Cr transform block of the TU to generate a Cr coefficient block for the TU.

[0096] After generating a coefficient block (e.g., a luma coefficient block, a Cb coefficient block, or a Cr coefficient block), the video encoder 20 may quantize the coefficient block. Quantization generally refers to a process in which transform coefficients are quantized to potentially reduce the amount of data used to represent the transform coefficients, thereby providing further compression. After the video encoder 20 quantizes the coefficient block, the video encoder 20 may entropy encode syntax elements indicating the quantized transform coefficients. For example, the video encoder 20 may perform CABAC on the syntax elements indicating the quantized transform coefficients. Finally, the video encoder 20 may output a bitstream including a sequence of bits that form a representation of an encoded frame and associated data, and the bitstream is stored in the storage device 32 or sent to the target device 14.

[0097] After receiving the bitstream generated by the video encoder 20, the video decoder 30 can parse the bitstream to obtain syntax elements from the bitstream. The video decoder 30 can reconstruct the frame of the video data based at least in part on the syntax elements obtained from the bitstream. The process of reconstructing the video data is generally inverse to the encoding process performed by the video encoder 20. For example, the video decoder 30 can perform an inverse transform on the coefficient block associated with the TU of the current CU to reconstruct the residual block associated with the TU of the current CU. The video decoder 30 also reconstructs the coding block of the current CU by adding the samples of the prediction block for the PU of the current CU to the corresponding samples of the transform block of the TU of the current CU. After reconstructing the coding block for each CU of the frame, the video decoder 30 can reconstruct the frame.

[0098] As mentioned above, video coding mainly uses two modes, namely, intra-frame prediction (or intra-frame prediction) and inter-frame prediction (or inter-frame prediction) to achieve video compression. It should be noted that IBC can be regarded as intra-frame prediction or a third mode. Between the two modes, inter-frame prediction contributes more to coding efficiency than intra-frame prediction because motion vectors are used to predict the current video block based on the reference video block.

[0099] But with the ever-improving video data capture technology and finer video block sizes for retaining details in the video data, the amount of data required to represent the motion vector for the current frame has also increased significantly. One way to overcome this challenge benefits from the fact that not only a set of neighboring CUs in both the spatial and temporal domains have similar video data for prediction purposes, but also the motion vectors between these neighboring CUs are similar. Therefore, the motion information of spatially neighboring CUs and / or temporally co-located CUs can be used as an approximation of the motion information (e.g., motion vector) of the current CU (which is also called the "motion vector predictor" (MVP) of the current CU) by exploring their spatial and temporal correlations.

[0100] Instead of combining as above Figure 1BThe actual motion vector of the current CU determined by the motion estimation unit is encoded into the video bitstream, and the motion vector predictor of the current CU is subtracted from the actual motion vector of the current CU to generate a motion vector difference (MVD) for the current CU. By doing so, the motion vector determined by the motion estimation unit for each CU of the frame does not need to be encoded into the video bitstream, and the amount of data used to represent the motion information in the video bitstream can be significantly reduced.

[0101] Similar to the process of selecting a prediction block in a reference frame during inter-frame prediction of a coding block, both the video encoder 20 and the video decoder 30 need to adopt a set of rules for constructing a motion vector candidate list (also called a "merge list") for the current CU using those potential candidate motion vectors associated with the spatial neighboring CUs and / or temporal co-located CUs of the current CU, and then selecting a member from the motion vector candidate list as the motion vector predictor for the current CU. By doing so, the motion vector candidate list itself does not need to be sent from the video encoder 20 to the video decoder 30, and the index of the selected motion vector predictor within the motion vector candidate list is sufficient for the video encoder 20 and the video decoder 30 to use the same motion vector predictor within the motion vector candidate list to encode and decode the current CU.

[0102] The main goal of the present disclosure is to enhance the efficiency of the CABAC technique used in a hybrid video codec framework. Specifically, several improvements are proposed to increase the accuracy of the probability estimate of the sequence of binary symbols (also referred to as binary bits) of syntax elements generated when compressing video signals. In the following, an in-depth analysis of existing CABAC techniques applied in modern video codec standards (such as AVC, HEVC and VVC) is first provided. Then, some defects / limitations in the existing CABAC design are discussed. After that, a method for improving the efficiency of CABAC by increasing the accuracy of probability estimates is proposed.

[0103] Probability Estimation Techniques for CABAC in AVC and HEVC

[0104] CABAC was originally introduced in the H.264 / AVC standard as one of the two supported entropy coding schemes. In CABAC, arithmetic coding consists of two modules: codeword mapping (also called binarization) and probability estimation. In the process of codeword mapping, syntax elements are mapped into binary bit strings. The mapping is implemented by the so-called binarizer, which converts syntax elements into several groups of binary bits based on different binarization schemes. In practice, various binarization schemes can be applied to this conversion, such as fixed-length codes, unary codes, truncated unary codes, and k-order exponential Golomb codes. The purpose of the probability estimation module is to determine the probability that a binary bit has a value of 1 or 0. In AVC, the probability of a binary bit is calculated based on an exponential aging model, in which the probability that a current binary bit is equal to 1 or 0 depends on the value of the previous binary bit previously encoded and decoded. In addition, according to general data statistics, the influence of the binary bit immediately before a current binary bit is usually greater than the binary bit that was encoded and decoded a long time ago. Taking this into account, a parameter α is introduced in CABAC, which controls the number N of previously coded bits used to estimate the probability of the current bit, that is, N = 1 / α. This parameter translates into an adaptation speed at which the probability is updated along with the increased coded bits. Specifically, using the adaptive parameter α, the probability that a bit is the least likely symbol (LPS) is recursively calculated as

[0105] p(t+1)=p(t)·(1-α)+x(t)·α (1)

[0106] where p(t) is the probability of the LPS symbol at time t; p(t+1) is the updated probability of the LPS symbol at time t+1; x(t) is equal to 1 when the current bin is the LPS symbol and equal to 0 when the current bin is the most probable symbol (MPS). In the CABAC engine of AVC and HEVC, for each syntax element with a fixed value of α≈1 / 19.69, the probability is updated independently according to (1), that is, when estimating the probability of a current bin, approximately 19.69 previously encoded bins are considered. In addition, in order to avoid multiplication during probability estimation, the probability p(t) in equation (1) (which is a real number and ranges from 0 to 1) is quantized into a set of fixed probability states. For example, in both AVC and HEVC, the probability has 7 bits of precision, corresponding to 128 probability states.

[0107] In AVC and HEVC, a video bitstream is usually composed of one or more independently decodable slices. At the beginning of each slice, the probabilities of all contexts are initialized to some predefined values. In theory, if the statistical properties of a given context are known, a uniform distribution (i.e., p init=0.5) to initialize the context probability. However, in order to enable the probability of a context to catch up with its corresponding statistical distribution more quickly, it has been found to be beneficial to provide some appropriate initial probability values ​​(which may not be equally likely) for each context. Specifically, in AVC and HEVC, given the initial QP of a slice SliceQPY, the initial probability state InitProbState of a context is calculated as follows:

[0108]

[0109] Wherein, SlopeIdx and OffsetIdx (both in the range of 0 to 15) are two initialization parameters, which are predefined and stored as a lookup table (LUT) to calculate the initial probability of a context. As shown in equation (2), the initial probability state is modeled by a linear function of the slice QP with a slope equal to (m>>4) and an offset equal to n.

[0110] Probability estimation technique for CABAC in VVC

[0111] The probability estimation module applied in VVC is kept almost the same as that in AVC and HEVC, except for the following key differences: First, VVC maintains two probability estimates for each context, where each probability estimate has its own probability adaptation rate α in equation (1). The final probability actually used for arithmetic coding is the average of the two estimates; Second, in VVC, multiple probability LUTs are predefined and used to initialize the probabilities of different contexts of a slice. At the same time, similar to AVC and HEVC, the initial estimate of the probability is built on a linear model with the slice QP as input. However, in VVC, the derived value represents the actual probability value; while in AVC / HEVC, it represents the index of the probability state.

[0112] Multiple hypothesis probability estimation

[0113] Obviously, due to their different statistical properties, using a fixed adaptive parameter for all syntax elements may not be optimal. On the other hand, it has been shown in some scientific studies that better estimation accuracy can be achieved by using multiple probability estimators compared to a single estimator. Therefore, a multi-hypothesis probability estimation scheme is applied in the CABAC design of VVC, in which two different adaptive parameters α0 and α1 corresponding to a slow and a fast one for probability adaptation are used. In this way, two different probabilities can be calculated for each binary bit using two adaptive parameters, and then averaged to generate the final probability of the binary bit, that is,

[0114]

[0115] Among them, α0 and α1 are two adaptive parameters associated with two probability hypotheses. In VVC, the values ​​of α0 and α1 are selected independently for each context using a training algorithm designed to jointly optimize the adaptive parameters and the initial probabilities. Specifically, according to the current design, each context is allowed to select α0 from a set of predefined values ​​{1 / 4, 1 / 8, 1 / 16, 1 / 32} and α1 from another set of predefined values ​​{1 / 32, 1 / 64, 1 / 128, 1 / 256, 1 / 512}.

[0116] Initial probability calculation

[0117] As in AVC / HEVC, VVC's CABAC process also calls a QP-related probability initialization process at the beginning of each slice. However, compared to AVC / HEVC, which initializes the state of a probability state machine, the actual value of the initial probability is derived directly, as described as:

[0118]

[0119] Among them, SlopeIdx and OffsetIdx are two initialization parameters used to calculate the slope and offset of the linear model, and each initialization parameter is represented with 3 bits of precision; and are the two initial probabilities calculated for the two probability estimators.

[0120] Compared with the CABAC design in AVC / HEVC, the probability estimation scheme in VVC can more accurately capture the true statistical distribution of the binary bits for each context, resulting in improved CABAC efficiency. However, its design can still be further improved. Specifically, the following defects in the current probability estimation of the VVC CABAC process are identified in the present disclosure:

[0121] First, as mentioned above, in VVC, a multi-hypothesis based probability estimation scheme is applied, where two probability estimators (one with a fast adaptation rate and the other with a slow adaptation rate) are used to estimate the probability of a binary bit for each context model. In addition, in the existing design, the probability of a binary bit is just a simple average of the two probability estimators. Considering that fixed weights may not be flexible enough to adapt to the changing data statistics of different contexts, this design is suboptimal.

[0122] On the other hand, according to the existing VVC design, the probabilities of all contexts in one slice are initialized based on three sets of initial context values ​​predefined for different slice types (i.e., I, B, and P slices). Among them, only the set of initial context values ​​of the I slice type is allowed to be used for the I slice, while the set of initial context values ​​of the B slice and the P slice is allowed to be used for the B slice or the P slice. Due to its specific characteristics, the binary bits of each video bitstream usually present very different statistical characteristics from each other. Therefore, using only a set of three fixed initial context values ​​is far from optimal for providing an effective starting point for the probability estimator to quickly capture the true probability distortion of each context. On the other hand, due to the strong temporal correlation within a video sequence, the probability statistics of the contexts from the slices encoded and decoded before the current slice can potentially provide a more accurate estimate to initialize the probability of the context in the current slice.

[0123] In the present disclosure, a method is proposed to solve the problems / defects existing in the existing probability estimation schemes in VVC. Specifically, the following method is proposed to further improve the probability estimation accuracy while considering the friendliness to the hardware codec implementation.

[0124] First, to improve the accuracy of probability estimation, a binary arithmetic coding with weighted multi-hypothesis probability update is proposed. Specifically, instead of using simple averaging, the final probability for encoding and decoding a binary bit of each context is calculated as a weighted combination of two probability estimates p0 and p1 associated with the context. In addition, multiple initialization methods are proposed to indicate the initial weight parameters for the context at the beginning of a slice.

[0125] Secondly, an improved initialization scheme is proposed to initialize the state parameters of the context for the inter-coded slice. Specifically, in addition to using the existing fixed context initialization table, the proposed scheme allows initializing the state parameters of the context (e.g., two probability estimators, adaptive rate and weighting factors for the combination of the two probability estimators in one inter-coded slice) which are copied from the corresponding state parameters of the previously coded slice.

[0126] Multi-hypothesis probability estimation with adaptive weights

[0127] In VVC, a multi-hypothesis based probability estimation is applied, where the final probability when encoding and decoding each binary bit of a context is calculated as the average of two probability estimators. Given the specific statistical characteristics of different video bitstreams, it is obvious that such a scheme (i.e., using equal weights (i.e., 0.5)) will not always be flexible enough to capture the true symbol statistics when combining two probability estimators of a context. Therefore, in this section, a multi-hypothesis probability estimation with adaptive weights (MHP-AW) is proposed to further improve the probability estimation accuracy of VVC. Specifically, similar to the VVCCABAC design, two separate probability estimators p0 and p1 are maintained for each context and updated based on their own adaptive rates α0 and α1. However, instead of using a fixed average, multiple weight parameters are introduced in the proposed scheme, where the final probability p for binary arithmetic coding of a context is derived based on the weighted combination of the two probability estimators. In detail, the proposed probability estimation can be formulated as

[0128]

[0129] where ω is the weight for the combination of the two probability estimators, whose value is obtained from the range [0,1]. In equation (5), the weight ω represents a real value, which needs to be quantized to an integer for hardware / software codec implementation. In practice, different methods can be applied to convert the value ω to an integer. For example, a quantization step size q can be applied. step A uniform quantizer can approximate the true weight value by multiplying an integer and the quantization step size, as follows:

[0130] ω=ω int ·q step (6)

[0131] Among them, ω int is an integer weight value. In addition, the quantization step size, which is also a real value, can be approximated as a right shift operation of M bits, as shown below:

[0132] ω=ω int ·q step =ω int >>M (7)

[0133] As shown in equation (7), when the proposed MHP-AW scheme is implemented in hardware / software, additional memory is required to store the integer weight values ​​ω intAt the same time, as shown in equation (5), the precision of the integer weight (i.e., M) also determines the bit width of the multiplier required for the weighted combination of the two probability estimators. Therefore, in practice, different sets of integer weight values ​​and representation precisions can be applied to achieve various trade-offs between codec efficiency and hardware / software implementation complexity. For example, assuming that the representation precision M is equal to 5, different sets of integer values ​​can be applied. In one example, it is proposed to select the best weight for each context from a predefined set {0,3,6,10,13,16,19,22,26,29,32}. In another example, it is proposed to set the weight from a predefined set {0,6,11,16,21,26,32}. In another example, it is proposed to use a set of predefined integer weight values ​​{0,8,12,16,20,24,32}. In another embodiment, a set of predefined integer weights using three different weight values ​​{12,16,20} containing 5 bits of precision is provided.

[0134] In all the examples above, the sum of the weights applied to the two probabilities p0(t) and p1(t) is constrained to be equal to 1. Although it can reduce the storage size of the weights (because only one weight value needs to be stored and the other weight can be easily derived from the stored weight value), this constraint may not maximize the codec gain achievable by MHP-AW. Therefore, in order to further improve the performance, it is provided that when combining two probability estimators for each context, a weight value (which is not constrained that the sum of the two weights is equal to 1) is applied in the proposed MHP-AW method, that is,

[0135]

[0136] Wherein, ω0 and ω1 are weights for the combination of the two probability estimates, whose values ​​are obtained from the range [0,1]. In one example, the values ​​of ω0 and ω1 are independently selected so that the sum of ω0 and ω1 can be equal to 1, less than 1, or greater than 1. In another example, when determining the two weights for MHP-AW, a constraint may be applied so that the sum of ω0 and ω1 is equal to 1 or less than 1, that is, ω0+ω1≤1. In yet another example, any selection of the two weights ω0 and ω1 is still allowed; but in order to keep the range of the final probability p within the original range [0,1], an additional 1-bit right shift (i.e., equivalently divided by 2) is provided to derive the final probability when the sum of ω0 and ω1 is greater than 1; otherwise (the sum of ω0 and ω1 is less than or equal to 1), the final probability is calculated as a direct weighted combination of the two probability estimators, that is,

[0137]

[0138] In the above example, when the sum of the two probabilities is greater than 1, the combined probability is divided by 2 to calculate the final probability of arithmetic coding. In other methods, other constant values ​​(e.g., M) can be applied in the proposed scheme to achieve different weighted combinations of the two probability estimates; in particular, in this way, equation (9) can be generalized as

[0139]

[0140] Similarly, when applying the above examples, the weight values ​​need to be approximated as integer values, and in practice different sets of integer weights (with various representation precisions) can be applied for different performance / complexity trade-offs. As a specific example, assuming that the precision of the stored weights is 5 bits, the weights can be selected from a predefined set {0, 3, 6, 10, 13, 16, 19, 22, 26, 29, 32}. In another example, the weights are selected from a predefined set {0, 6, 11, 16, 21, 26, 32}. In yet another example, a set of predefined integer weight values ​​{0, 8, 12, 16, 20, 24, 32} is provided. In the last example, a set of predefined integer weights containing three different weight values ​​{12, 16, 20} is provided.

[0141] Similar to probability and adaptive rate, in the proposed MHP-AW scheme, a weight ω is required for each context at the beginning of a stripe. int An initial value of . In the following, different schemes for initialization of MHP-AW weights are proposed. In a first method, it is proposed to define multiple different predefined tables, each predefined table containing a set of weight initialization values ​​for all contexts in a slice. Before encoding / decoding a slice, a predefined table can be selected and the corresponding MHP-AW weights can be initialized based on the corresponding weight values ​​of the table. For example, in one embodiment, multiple initial weight tables that depend on the slice type can be derived, for example, three sets of weight initialization tables designed specifically for I, P and B slices. In this way, for a slice, the video encoder can select one from the three predefined tables to initialize the MHP-AW weights to better adapt to the symbol statistics in the slice. When this scheme is applied, an additional syntax element sh_cabac_weight_init_idx can be signaled for each slice, indicating which initial weight table is selected for the slice, as shown in Table 1 below:

[0142] Table 1

[0143]

[0144]

[0145] Among them, the syntax pps_cabac_weight_init_present_flag is a control flag signaled in the picture parameter set (PPS), which indicates whether different initial weight tables are allowed to be selected for each slice. When this flag is enabled, another syntax sh_cabac_weight_init_idx is further signaled at the slice level to indicate the selected initial weight table. In another embodiment, it is proposed to allow only the MHP-AW weights of the I slice to be initialized by the initial weight table associated with the I slice type, while the MHP-AW weights of the P and B slices are allowed to be initialized from one of the predefined weight initialization tables. Specifically, it is proposed to allow only the initial weight table of the B (or P) slice type to be used to initialize a P (or B) slice in addition to the initial weight table associated with the slice type of the current slice. Accordingly, in this case, for the initial table selection of the MHP-AW weights of the P / B slices, only one flag needs to be signaled for each slice, as shown in Table 2 below:

[0146] Table 2

[0147]

[0148] When the flag sh_cabac_weight_init_flag is equal to 0, it means that the initial weight table corresponding to the slice type of the current slice is used to initialize the value of the MHP-AW weight of the slice; when the flag is equal to 1, it means that when the current slice is a B slice, the initial weight table corresponding to the P slice type is used to initialize the value of the MHP-AW weight in the slice, and when the current slice is a P slice, the initial weight table corresponding to the B slice type is used to initialize the value of the MHP-AW weight in the slice.

[0149] In addition, in another embodiment of the present disclosure, there is provided an extension of the existing CABAC initialization table to include a corresponding MHP-AW weight for each context. Specifically, after such a change, each element of a CABAC initialization table contains three different categories of information, including 1) an initial probability value, 2) an adaptation rate for initializing the probability and adaptation speed of two probability hypotheses, and 3) an MHP-AW weight for combining the two hypotheses when updating the probability of each context. Similar to the existing VVC design, when this scheme is applied, multiple CABAC initialization tables can be predetermined, and syntax elements can be transmitted from the encoder to the decoder with a signal to notify which initialization table will be selected for each slice to initialize the corresponding values ​​of the two probabilities, two adaptation rates, and combined weights associated with each slice. In a specific embodiment, it is proposed to reuse the existing CABAC initialization syntax elements, namely pps_cabac_init_present_flag and sh_cabac_init_flag, to indicate the selection of the CABAC initialization table in the slice. When this method is applied, the CABAC state (i.e., probability, adaptation rate, and combining weight) of the I slice is only allowed to be initialized by the initialization table of the I slice type, while the CABAC state of the P (or B) slice is allowed to be initialized by the initialization table of the B (or P) slice type. In another embodiment, a predetermined number of CABAC tables (>3) is proposed, and the CABAC state of a slice is allowed to be initialized arbitrarily from one of the predefined tables.

[0150] In all the above methods, when encoding and decoding a slice, a fixed value is used to initialize the MHP-AW weights of the context, which may not be accurate to provide a reliable probability estimate for arithmetic coding. To address such issues, a method is provided to give the encoder the flexibility to calculate the optimal MHP-AW weights for each slice and signal the corresponding optimal MHP-AW weights to the decoder.

[0151] In one embodiment, there is provided a method for directly signaling the weight value of each context element. For example, a flag may first be signaled to indicate whether the MHP-AW weights of the contexts in a slice are initialized with a fixed initialization table. When the flag is equal to 1, another syntax element may be signaled to inform the decoder which weight initialization table is applied to the current slice; otherwise, i.e., the flag is equal to 0, the MHP-AW weights of the contexts in the slice will be initialized by the values ​​parsed from the bitstream. In practice, different binarization methods may be applied to generate codewords for MHP-AW weight values, such as fixed-length codes, unary codes, k-order exponential Golomb codes, etc.

[0152] In another embodiment, an adaptive signaling method is proposed. Specifically, at the beginning of each slice, the scheme first sends a binary map weightMap[] from the encoder to the decoder, where each element indicates whether the corresponding context uses an initialization weight value from the selected default initialization weight table. When the i-th weightMap[] mapping entry is equal to 0, this means that the MHP-AW weight of the i-th context of the current slice will be initialized by the corresponding value in the selected initialization weight table. When the i-th weightMap[] mapping entry is equal to 1, this means that the MHP-AW weight of the i-th context of the current slice will be initialized by the initial value indicated in the bitstream. Different methods can be applied to encode and decode the mapped weightMap[]. In one example, it is proposed to use run length coding to encode and decode the mapped binary value, wherein a "run" value is sent to indicate the number of consecutive 0s (or 1s) before a 1 (or 0) is met.

[0153] Inherited from the initial CABAC state of the previous codec slice

[0154] As discussed above, symbols of the same context in different video bitstreams usually present quite different statistical properties. Assuming the probability states in the predefined CABAC table is fixed and cannot adapt to the specific characteristics of different slices. There is a potential drop in encoding and decoding efficiency when the predefined initial table deviates from the true symbol statistics of the video bitstream. In order to improve CABAC efficiency, an improved CABAC initialization scheme is proposed for initializing the context according to the context state after encoding / decoding a previous slice. There may be different ways of identifying the previous slice for CABAC initialization.

[0155] In one embodiment, there is provided a method of maintaining the output context states of N previously coded slices. When a current slice is encoded, the video encoder will select the best one from the N previously coded slices and signal an index to the decoder to initialize the context of the current slice according to the corresponding context state of the selected previously coded slice (as indicated by the signaled index value).

[0156] In other embodiments, instead of directly signaling the selected previously coded slice in the bitstream, some implicit decoder-side selection schemes may be applied to select the corresponding previously coded slice for context initialization of the current slice, including:

[0157] Rule #1: It is proposed to directly select the slice that is encoded just before the slice according to the encoding and decoding order.

[0158] Rule #2: It is proposed to select the previously coded slice that is closest in order to the current slice and has the same slice type.

[0159] Rule #3: It is proposed to select the previously coded slice that is closest to the current slice in order and has the smallest QP difference with the current slice.

[0160] Rule #4: It is proposed to select the previously coded slice that is closest to the current slice in order and has the same temporal layer as the current slice.

[0161] Although the above implicit selection rules are proposed separately, they can also be combined and applied together in the provided initial CABAC state inheritance scheme. In a specific example, it is proposed to combine rules #2, #3 and #4 together. Specifically, based on such a combination, the encoder / decoder can select a previously coded slice of the same slice type, which is closest to the current slice according to the coding order and has the smallest QP difference with the current slice. In the absence of such a previously coded slice, one of the existing predefined CABAC initialization tables can be applied to initialize the context state of the current slice. In addition, when any of the above methods is applied, an additional inheritance constraint can be applied to prevent a slice from inheriting its context state from another slice located at the same picture to which the slice belongs.

[0162] In addition, in the provided inheritance-based context initialization scheme, the inherited context state may include different categories of state information, such as probability values, adaptive rates, and combining weights (when the provided MHP-AW scheme is applied). In one embodiment of the present disclosure, it is proposed to inherit only one state information from the selected previously coded stripe, and use the existing predefined CABAC initialization table to initialize other state information of the current stripe. In another embodiment, it is proposed to inherit only two state information from the selected previously coded stripe. In yet another embodiment, it is proposed to inherit all state information of the current stripe from the corresponding context state of the selected previously coded stripe.

[0163] Although it can improve the efficiency of context initialization, the above inheritance-based CABAC initialization can introduce parsing dependencies between different slices. This is because the entropy coding of a current slice cannot be invoked before the entropy coding of its reference slice (i.e., the selected previously coded slice) is completely completed.

[0164] In order to provide better control over the efficiency and parallelism of entropy coding and decoding, an adaptive CABAC initialization scheme is proposed, in which the context state of a current slice can be initialized in one of two ways: 1) by using one of the predefined CABAC initialization tables; or 2) by the resulting context state of a previously coded slice. Specifically, in the proposed scheme, a binary flag is first signaled at the beginning of a slice. When the flag is equal to zero, it means that the context of the current slice will be initialized by one of the existing predefined CABAC initialization tables (e.g., as indicated by the syntax element sh_cabac_init_flag). When the flag is equal to 1, it means that the inheritance-based context initialization method will be applied, in which the initialization context value will be set to the context state output from the selected slice that was coded and decoded before the current slice.

[0165] In another example, it is provided that the context state (e.g., probability, adaptive rate, and MHP-AW weight) is stored after the encoding and decoding of a fixed block in a previously encoded picture is completed, and the stored context state will be used as a candidate to initialize the context state of the slice to be encoded in the future. In addition, in order to achieve different trade-offs between encoding and decoding efficiency and parsing dependency, it is provided to signal the location of the storage location in the bitstream (i.e., the location where the context state is stored in a picture). In the example provided, CTU is used as the basic unit for storing the context state, and the following Table 3 shows an example, in which an additional syntax element (pps_pos_store_context_state_in_ctu) is introduced in the PPS to indicate the location where the context state is stored in each picture.

[0166] Table 3

[0167]

[0168]

[0169] Among them, the syntax pps_cabac_weight_init_present_flag is a control flag signaled in a picture parameter set (PPS) that indicates whether context state inheritance for inter slices referencing the PPS is allowed. When the flag is enabled, another syntax pps_pos_store_context_state_in_ctu is further signaled to indicate the position of the CTU where the corresponding context state is stored after the CTU is encoded and decoded.

[0170] In another example, other granularities are provided to indicate the location where the context state is stored. In one specific example, a CTU row based granularity is provided to store the context state in one picture. Accordingly, when this scheme is applied, an additional syntax element pps_pos_store_context_state_in_ctu_row may be signaled to identify the CTU row where the resulting context state will be stored after all CTUs in the row have been fully encoded and decoded. In addition, although the context state storage location is signaled in the PPS in the above examples, in practice, those syntax elements may be signaled at various levels, such as sequence parameter set (SPS), picture header, slice header, CTU level, or even codec block group level.

[0171] In another specific example, a context storage location is selected from two predefined locations in a picture: 1) storing the context state after completely encoding and decoding all CTUs in a picture; 2) storing the context state after encoding and decoding a target CTU at position (PicWidthInCTU·PicHeightInCTU) / 2+PicWidthInCTU / 2. Table 4 below shows an example of signaling a corresponding flag in the PPS to indicate a corresponding storage location of the context state in each picture:

[0172] Table 4

[0173]

[0174] When the flag pps_store_context_state_sel_flag is equal to 0, this means that the target CTU for storing the context state is the middle CTU located at (PicWidthInCTU·PicHeightInCTU) / 2+PicWidthInCTU / 2; otherwise, this means that the target CTU for storing the context state is the last CTU in one picture.

[0175] Additionally, instead of signaling the context state storage location in the bitstream, another example provides using one fixed location (eg, the last CTU or a middle CTU in a picture) in both the encoder and the decoder.

[0176] Figure 4A computing environment (or computing device) 410 coupled to a user interface 460 is shown. The computing environment 410 may be part of a data processing server. In some embodiments, the computing device 410 may perform any of the various methods or processes (such as encoding / decoding methods or processes) described above according to various examples of the present disclosure. The computing environment 410 may include a processor 420, a memory 440, and an I / O interface 450.

[0177] The processor 420 generally controls the overall operation of the computing environment 410, such as operations associated with display, data acquisition, data communication, and image processing. The processor 420 may include one or more processors for executing instructions to perform all or part of the steps in the above method. In addition, the processor 420 may include one or more modules that facilitate the interaction between the processor 420 and other components. The processor may be a central processing unit (CPU), a microprocessor, a single-chip microcomputer, a GPU, etc.

[0178] The memory 440 is configured to store various types of data to support the operation of the computing environment 410. The memory 440 may include predetermined software 442. Examples of such data include instructions for any application or method operating on the computing environment 410, video data sets, image data, etc. The memory 440 may be implemented using any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk, or optical disk.

[0179] I / O interface 450 provides an interface between processor 420 and peripheral interface modules such as a keyboard, click wheel, buttons, etc. Buttons may include, but are not limited to, a home button, a start scan button, and a stop scan button. I / O interface 450 may be coupled to an encoder and a decoder.

[0180] In some embodiments, a non-transitory computer-readable storage medium including a plurality of programs (such as included in the memory 440) is also provided, which is executable by the processor 420 in the computing environment 410 for performing the above method. For example, the non-transitory computer-readable storage medium can be a ROM, RAM, CD-ROM, magnetic tape, floppy disk, optical data storage device, etc.

[0181] The non-transitory computer-readable storage medium has stored therein a plurality of programs for execution by a computing device having one or more processors, wherein the plurality of programs, when executed by the one or more processors, causes the computing device to perform the above-mentioned method for motion prediction.

[0182] In some embodiments, the computing environment 410 may be implemented using one or more application specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), graphics processing units (GPUs), controllers, microcontrollers, microprocessors, or other electronic components to perform the above methods.

[0183] Figure 5 is a flow chart illustrating a method for video decoding according to an example of the present disclosure. The method may be implemented by a binary arithmetic decoder.

[0184] In step 501, at the binary arithmetic decoder side, the processor 420 may obtain a first probability for a binary symbol according to a first adaptive parameter, wherein the binary symbol is associated with a given context model for the binary arithmetic decoder, and the binary symbol is from a plurality of binary symbols associated with the context model. In some examples, the decoder may use the binary arithmetic decoder to obtain a first probability for a binary symbol based on a given context model and the first adaptive parameter, wherein the binary symbol is one of the plurality of binary symbols associated with the context model.

[0185] In step 502, the processor 420 may obtain a second probability for a binary symbol according to a second adaptive parameter. In some examples, the first adaptive weight and the second adaptive weight may be obtained from a predefined range, respectively. For example, as shown in equation (8), ω0 and ω1 are weights used for the combination of the two probability estimates, and their values ​​may be obtained from the range [0, 1].

[0186] In some examples, the first adaptive weight and the second adaptive weight may be obtained independently, and the sum of the first adaptive weight and the second adaptive weight satisfies one of the following conditions: the sum is equal to 1, the sum is less than 1, or the sum is greater than 1.

[0187] In some examples, processor 420 may further obtain a third probability as a weighted combination of the first probability and the second probability based on the first adaptive weight and the second adaptive weight.

[0188] In some examples, processor 420 may further obtain the multi-hypothesis probability according to the third probability and the sum of the first adaptive weight and the second adaptive weight.

[0189] In some examples, the processor 420 may obtain the multiple hypothesis probability by applying a right shift operation to the third probability in response to determining that the sum of the first adaptive weight and the second adaptive weight is greater than 1. In addition, the processor 420 may obtain the multiple hypothesis probability by dividing the third probability by a constant value in response to determining that the sum of the first adaptive weight and the second adaptive weight is greater than 1.

[0190] In some examples, processor 420 may obtain multiple hypotheses equal to the third probability in response to determining that the sum of the first adaptive weight and the second adaptive weight is not greater than 1.

[0191] For example, as shown in equation (9), when the sum of the two probabilities is greater than 1, the third probability may be a combined probability divided by 2 to calculate the final probability of arithmetic coding. As shown in equation (10), the third probability may also be a combined probability divided by another constant value (e.g., M) to calculate the final probability of arithmetic coding.

[0192] For example, as shown in equation (9) or (10), in order to keep the range of the final probability p within the original range [0, 1], when the sum of ω0 and ω1 is greater than 1, an additional 1-bit right shift (i.e., equivalently divided by 2) may be applied to derive the final probability; otherwise (the sum of ω0 and ω1 is less than or equal to 1), the final probability is calculated as a direct weighted combination of the two probability estimators, as shown in equation (9). In some examples, other constant values ​​(e.g., M) may be applied to achieve different weighted combinations of the two probability estimators, as shown in equation (9).

[0193] In some examples, processor 420 may obtain the first adaptive weight from a set of predetermined weight values.

[0194] In some examples, processor 420 may divide the set of predetermined integer values ​​by a constant value to obtain the set of predetermined weight values.

[0195] For example, assuming that the precision of storing weights is 5 bits, the weights may be selected from a predefined set {0, 3, 6, 10, 13, 16, 19, 22, 26, 29, 32}. In another example, the weights may be selected from a predefined set {0, 6, 11, 16, 21, 26, 32}. In yet another example, a set of predefined integer weight values ​​{0, 8, 12, 16, 20, 24, 32} may be used. In yet another example, a set of predefined integer weights including three different weight values ​​{12, 16, 20} may be used.

[0196] In step 503, the processor 420 may obtain a multi-hypothesis probability based on the first probability, the first adaptive weight, the second probability, and the second adaptive weight, wherein the multi-hypothesis probability determines a probability that a binary symbol is equal to a binary value.

[0197] For example, the multiple hypothesis probability can be p t (t+1), as shown in equation (9) or (10).

[0198] In step 504, processor 420 may decode a binary symbol according to the multiple hypothesis probabilities.

[0199] Figure 6 is shown as Figure 5 The method for video decoding shown in FIG. 1 corresponds to a flow chart of a method for video encoding. The method can be implemented by a binary arithmetic encoder.

[0200] In step 601, at a binary arithmetic encoder side, the processor 420 may obtain a first probability for a binary symbol based on a first adaptive parameter, wherein the binary symbol is associated with a given context model for the binary arithmetic encoder and the binary symbol is from a plurality of binary symbols associated with the context model.

[0201] In step 602, the processor 420 may obtain a second probability for a binary symbol according to a second adaptive parameter. In some examples, the first adaptive weight and the second adaptive weight may be obtained from a predefined range, respectively. For example, as shown in equation (8), ω0 and ω1 are weights used for the combination of the two probability estimates, and their values ​​may be obtained from the range [0, 1].

[0202] In some examples, the first adaptive weight and the second adaptive weight may be obtained independently, and the sum of the first adaptive weight and the second adaptive weight satisfies one of the following conditions: the sum is equal to 1, the sum is less than 1, or the sum is greater than 1.

[0203] In some examples, processor 420 may further obtain a third probability as a weighted combination of the first probability and the second probability based on the first adaptive weight and the second adaptive weight.

[0204] In some examples, processor 420 may further obtain the multi-hypothesis probability according to the third probability and the sum of the first adaptive weight and the second adaptive weight.

[0205] In some examples, the processor 420 may obtain the multiple hypothesis probability by applying a right shift operation to the third probability in response to determining that the sum of the first adaptive weight and the second adaptive weight is greater than 1. In addition, the processor 420 may obtain the multiple hypothesis probability by dividing the third probability by a constant value in response to determining that the sum of the first adaptive weight and the second adaptive weight is greater than 1.

[0206] In some examples, processor 420 may obtain multiple hypotheses equal to the third probability in response to determining that the sum of the first adaptive weight and the second adaptive weight is not greater than 1.

[0207] For example, as shown in equation (9), when the sum of the two probabilities is greater than 1, the third probability may be a combined probability divided by 2 to calculate the final probability of arithmetic coding. As shown in equation (10), the third probability may also be a combined probability divided by another constant value (e.g., M) to calculate the final probability of arithmetic coding.

[0208] For example, as shown in equation (9) or (10), in order to keep the range of the final probability p within the original range [0, 1], when the sum of ω0 and ω1 is greater than 1, an additional 1-bit right shift (i.e., equivalently divided by 2) may be applied to derive the final probability; otherwise (the sum of ω0 and ω1 is less than or equal to 1), the final probability is calculated as a direct weighted combination of the two probability estimators, as shown in equation (9). In some examples, other constant values ​​(e.g., M) may be applied to achieve different weighted combinations of the two probability estimators, as shown in equation (9).

[0209] In some examples, processor 420 may obtain the first adaptive weight from a set of predetermined weight values.

[0210] In some examples, processor 420 may divide the set of predetermined integer values ​​by a constant value to obtain the set of predetermined weight values.

[0211] For example, assuming that the precision of storing weights is 5 bits, the weights may be selected from a predefined set {0, 3, 6, 10, 13, 16, 19, 22, 26, 29, 32}. In another example, the weights may be selected from a predefined set {0, 6, 11, 16, 21, 26, 32}. In yet another example, a set of predefined integer weight values ​​{0, 8, 12, 16, 20, 24, 32} may be used. In yet another example, a set of predefined integer weights including three different weight values ​​{12, 16, 20} may be used.

[0212] In step 603, the processor 420 may obtain a multi-hypothesis probability based on the first probability, the first adaptive weight, the second probability, and the second adaptive weight, wherein the multi-hypothesis probability determines a probability that a binary symbol is equal to a binary value.

[0213] For example, the multiple hypothesis probability can be p t (t+1), as shown in equation (9) or (10).

[0214] In step 604, processor 420 may encode a binary symbol according to the multiple hypothesis probabilities.

[0215] Figure 7 is a flowchart illustrating a method for video decoding according to an example of the present disclosure.

[0216] In step 701 , at the decoder side, the processor 420 may select a fixed position from a slice that was encoded and decoded before the current slice.

[0217] In some examples, processor 420 may receive a context state storage location from a bitstream sent by an encoder, where the context state storage location indicates a fixed position in a slice.

[0218] In some examples, the context state storage location may be signaled by the encoder in the bitstream and sent to the decoder at a certain level, where the certain level includes a picture parameter set (PPS) level, a sequence parameter set (SPS) level, a picture level, a slice level, a coding tree unit (CTU) level, or a coding block group level.

[0219] In some examples, the context state storage location may be predefined at one of the following locations: a location in a CTU in a slice or a last location in a CTU row.

[0220] In some examples, processor 420 may obtain a control syntax element indicating whether context state inheritance between slices is allowed. In addition, processor 420 may obtain a context state storage location syntax element indicating a context state storage location in response to determining that the control syntax element is enabled, the context state storage location indicating a fixed location in the slice. For example, the control syntax element may be a syntax element pps_cabac_weight_init_present_flag in Table 3, and the context state storage location syntax element may be a syntax element pps_pos_store_context_state_in_ctu in Table 3.

[0221] In some examples, the processor 420 may predefine the fixed position to be located at the last position of the last CTU in the slice or the middle position of the middle CTU in the slice. Assume that the CTU size is M×M, and (x, y) represents a coordinate in the CTU, where both x and y range from 0 to M-1. The last position of the CTU is the position at the coordinates (M-1, M-1), and the middle position of the CTU is the position at the coordinates (M / 2, M / 2). M can be a positive integer.

[0222] In some examples, processor 420 may obtain a store context state syntax element indicating where the fixed position is located. In addition, processor 420 may obtain the fixed position from a middle position of a middle CTU in a slice in response to determining that the store context state syntax element is equal to 0, and may obtain the fixed position from a last position of a last CTU in a slice in response to determining that the store context state syntax element is equal to 1. For example, the store context state syntax element may be the syntax element pps_store_context_state_sel_flag in Table 4.

[0223] In some examples, the slice and the current slice may not be located in the same picture. For example, when any of the rules in the "Inheritance from initial CABAC state of previously coded slice" section is applied, an additional inheritance constraint rule may be applied to prevent a slice from inheriting its context state from another slice located in the same picture to which the slice belongs.

[0224] In step 702, the processor 420 may store the context state of the one or more context models in response to determining that decoding of the coding block covering the fixed position has been completed and use the stored context state as the initial context state of the context model of one or more subsequent slices. The one or more subsequent slices may be slices to be encoded and decoded after the slice in step 701. The context model of the one or more subsequent slices may correspond to the stored context state of the one or more context models.

[0225] In some examples, the context state may include one or more context information including an initial probability value, an adaptation rate, and an adaptation probability weight.

[0226] Figure 8 is shown as Figure 7 The method for video decoding shown in FIG. 1 corresponds to a flow chart of a method for video encoding.

[0227] In step 801 , at the encoder side, the processor 420 may select a fixed position from a slice that is encoded and decoded before a current slice.

[0228] In some examples, processor 420 may signal a context state storage location, where the context state storage location indicates a fixed location in a stripe.

[0229] In some examples, the context state storage location is signaled in the bitstream at a certain level, where the level may include PPS level, SPS level, picture level, slice level, CTU level, or coding block group level.

[0230] In some examples, the context state storage location may be predefined at one of the following locations: a location in a coding tree unit (CTU) in a slice or a last location of a CTU row.

[0231] In some examples, processor 420 may signal a control syntax element indicating whether context state inheritance between slices is allowed. In addition, processor 420 may signal a context state storage location syntax element indicating a context state storage location in response to determining that the control syntax element is enabled, the context state storage location indicating a fixed location in the slice. For example, the control syntax element may be the syntax element pps_cabac_weight_init_present_flag in Table 3, and the context state storage location syntax element may be the syntax element pps_pos_store_context_state_in_ctu in Table 3.

[0232] In some examples, processor 420 may predefine the fixed position to be located at the last position of the last CTU in the slice or the middle position of the middle CTU in the slice.

[0233] In some examples, processor 420 may signal a store context state syntax element indicating where the fixed position is located. In addition, processor 420 may obtain the fixed position from a middle position of a middle CTU in a slice in response to determining that the store context state syntax element is equal to 0, and may obtain the fixed position from a last position of a last CTU in a slice in response to determining that the store context state syntax element is equal to 1. For example, the store context state syntax element may be the syntax element pps_store_context_state_sel_flag in Table 4.

[0234] In some examples, the slice and the current slice may not be located in the same picture. For example, when any of the rules in the "Inheritance from initial CABAC state of previously coded slice" section is applied, an additional inheritance constraint rule may be applied to prevent a slice from inheriting its context state from another slice located in the same picture to which the slice belongs.

[0235] In step 802, the processor 420 may store context states of one or more context models and use the stored context states as initial context states of context models of one or more subsequent slices. The one or more subsequent slices may be slices to be encoded and decoded after the slice in step 801. The context models of the one or more subsequent slices may correspond to the stored context states of the one or more context models.

[0236] In some examples, the context state may include one or more context information including an initial probability value, an adaptation rate, and an adaptation probability weight.

[0237] In some examples, a device for video encoding and decoding is provided. The device includes a processor 420 and a memory 440 configured to store instructions executable by the processor; wherein the processor is configured to perform the following when executing the instructions: Figures 5 to 8 Any method shown.

[0238] In some other examples, a non-transitory computer-readable storage medium having instructions stored therein is provided. When the instructions are executed by the processor 420, the instructions cause the processor to perform any of the methods shown in Figures 1-26. In one example, multiple programs can be executed by the processor 420 in the computing environment 410 to (e.g., Figure 1G The video encoder 20 of the computing environment 410 receives a bitstream or data stream containing encoded video information (e.g., video blocks representing encoded video frames and / or one or more associated syntax elements, etc.), and can also be executed by the processor 420 in the computing environment 410 to perform the above-mentioned decoding method according to the received bitstream or data stream. In another example, multiple programs can be executed by the processor 420 in the computing environment 410 to perform the above-mentioned encoding method to encode the video information (e.g., video blocks representing video frames and / or one or more associated syntax elements, etc.) into a bitstream or data stream, and can also be executed by the processor 420 in the computing environment 410 to send the bitstream or data stream (e.g., to Figure 2B Alternatively, the non-transitory computer-readable storage medium may have a bitstream or data stream stored therein, the bitstream or data stream comprising the video decoder 30 generated by the encoder (e.g., Figure 1G The video encoder 20) uses the coded video information (e.g., video blocks representing coded video frames and / or one or more associated syntax elements, etc.) generated by the coding method described above for use by a decoder (e.g., Figure 2B The video decoder 30) is used when decoding video data. The non-transitory computer-readable storage medium may be, for example, a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.

[0239] Other examples of the present disclosure will be apparent to those skilled in the art by considering the specification and practice of the present disclosure disclosed herein. This application is intended to cover any variation, use or adaptation of the present disclosure that follows the general principles of the present disclosure, and includes such deviations from the present disclosure within the scope of known or customary practice in the art. It is intended that the specification and examples are considered to be exemplary only.

[0240] It will be understood that the present disclosure is not limited to the exact examples described above and shown in the accompanying drawings, and that various modifications and changes may be made without departing from the scope thereof.

Claims

1. A method for video decoding, comprising: Obtaining, by the binary arithmetic decoder, a first probability for a binary symbol according to a first adaptation parameter, wherein the one binary symbol is associated with a given context model for the binary arithmetic decoder and the one binary symbol is from a plurality of binary symbols associated with the context model; Obtaining, by the decoder, a second probability for the one binary symbol according to a second adaptive parameter; Obtaining, by the decoder, a multi-hypothesis probability based on the first probability, the first adaptive weight, the second probability, and the second adaptive weight, wherein the multi-hypothesis probability determines a probability that the one binary symbol is equal to a binary value; and The one binary symbol is decoded by the decoder according to the multiple hypothesis probabilities.

2. The method according to claim 1, further comprising: Obtaining, by the decoder, the first adaptive weight from a predefined range; as well as The second adaptive weight is obtained by the decoder from the predefined range.

3. The method according to claim 1, further comprising: The first adaptive weight and the second adaptive weight are independently obtained by the decoder, wherein the sum of the first adaptive weight and the second adaptive weight satisfies one of the following conditions: The sum is equal to 1; and less than 1; or The sum is greater than 1; obtaining, by the decoder according to the first adaptive weight and the second adaptive weight, a third probability that is a weighted combination of the first probability and the second probability; and The multiple hypothesis probabilities are obtained by the decoder according to the third probability and the sum of the first adaptive weight and the second adaptive weight.

4. The method according to claim 3, further comprising: In response to determining that the sum of the first adaptive weight and the second adaptive weight is greater than 1, the multiple hypothesis probabilities are obtained by the decoder by applying a right shift operation to the third probability.

5. The method according to claim 3, further comprising: In response to determining that the sum of the first adaptive weight and the second adaptive weight is greater than 1, the multiple hypotheses are obtained by the decoder by dividing the third probability by a constant value.

6. The method according to claim 1, further comprising: In response to determining that the sum of the first adaptive weight and the second adaptive weight is not greater than 1, the multiple hypotheses equal to the third probability are obtained by the decoder.

7. The method according to claim 1, further comprising: The first adaptive weight is obtained by the decoder from a set of predetermined weight values.

8. The method according to claim 7, further comprising: The set of predetermined weight values ​​is obtained by the decoder from a set of predetermined integer values ​​divided by a constant value.

9. A method for video encoding, comprising: Obtaining, by the binary arithmetic encoder, a first probability for a binary symbol according to a first adaptive parameter, wherein the binary symbol is associated with a given context model for the binary arithmetic encoder and the binary symbol is from a plurality of binary symbols associated with the context model; Obtaining, by the encoder, a second probability for the one binary symbol according to a second adaptive parameter; Obtaining, by the encoder, a multi-hypothesis probability based on the first probability, the first adaptive weight, the second probability, and the second adaptive weight, wherein the multi-hypothesis probability determines a probability that the one binary symbol is equal to a binary value; and The one binary symbol is encoded by the encoder according to the multiple hypothesis probabilities.

10. The method according to claim 9, further comprising: Obtaining, by the encoder, the first adaptive weight from a predefined range; as well as The second adaptive weight is obtained by the encoder from the predefined range.

11. The method according to claim 9, further comprising: The first adaptive weight and the second adaptive weight are independently obtained by the encoder, wherein the sum of the first adaptive weight and the second adaptive weight satisfies one of the following conditions: The sum is equal to 1; and less than 1; or The sum is greater than 1; obtaining, by the encoder according to the first adaptive weight and the second adaptive weight, a third probability that is a weighted combination of the first probability and the second probability; and The multiple hypothesis probabilities are obtained by the encoder according to the third probability and a sum of the first adaptive weight and the second adaptive weight.

12. The method according to claim 11, further comprising: In response to determining that the sum of the first adaptive weight and the second adaptive weight is greater than 1, the multiple hypothesis probabilities are obtained by the encoder by applying a right shift operation to the third probabilities.

13. The method according to claim 11, further comprising: In response to determining that the sum of the first adaptive weight and the second adaptive weight is greater than 1, the multiple hypotheses are obtained by the encoder by dividing the third probability by a constant value.

14. The method according to claim 9, further comprising: In response to determining that the sum of the first adaptive weight and the second adaptive weight is not greater than 1, the multiple hypotheses equal to the third probability are obtained by the encoder.

15. The method according to claim 9, further comprising: The first adaptive weights are obtained by the encoder from a set of predetermined weight values.

16. The method according to claim 15, further comprising: The set of predetermined weight values ​​is obtained by the encoder from a set of predetermined integer values ​​divided by a constant value.

17. A video decoding method, comprising: The fixed position is selected by the decoder from the slice that was encoded and decoded before the current slice; as well as In response to detecting completion of decoding of a coding block covering the fixed position, obtaining, by the decoder, a stored context state by storing context states of one or more context models; as well as Use the stored context state as the initial context state for the context model of one or more subsequent strips.

18. The method according to claim 17, wherein: The context state includes one or more context information, and the one or more context information includes an initial probability value, an adaptation rate, and an adaptation probability weight.

19. The method according to claim 17, further comprising: A context state storage location is received by the decoder from a bitstream sent by an encoder, wherein the context state storage location indicates the fixed position in the slice.

20. The method according to claim 19, wherein: The context state storage location is signaled in a bitstream at a certain level, wherein the certain level includes a picture parameter set PPS level, a sequence parameter set SPS level, a picture level, a slice level, a coding tree unit CTU level, or a coding block group level.

21. The method according to claim 19, wherein: The context state storage location is predefined at one of the following locations: A position in a coding tree unit CTU in the slice; or The last position of a CTU row.

22. The method of claim 17, further comprising: obtaining, by the decoder, a control syntax element indicating whether context state inheritance for inter slices is allowed; as well as In response to determining that the control syntax element is enabled, a context state storage location syntax element indicating a context state storage location is obtained by the decoder, the context state storage location indicating the fixed position in the slice.

23. The method of claim 17, further comprising: The fixed position is predefined by the decoder to be located at the last position of the last coding tree unit CTU in the slice or the middle position of the middle CTU in the slice.

24. The method according to claim 23, further comprising: Obtaining, by the decoder, a stored context state syntax element indicating where the fixed position is located; In response to determining that the stored context state syntax element is equal to 0, obtaining, by the decoder, the fixed position from a middle position of a middle CTU in the slice; as well as In response to determining that the stored context state syntax element is equal to 1, obtaining, by the decoder, the fixed position from a last position of a last CTU in the slice.

25. The method of claim 17, wherein: The slice and the current slice are not located in the same picture.

26. A video encoding method, comprising: The fixed position is selected by the encoder from the slice that was encoded and decoded before the current slice; as well as The stored context state is obtained by the encoder by storing context states of one or more context models, and the stored context state is used as an initial context state of a context model of one or more subsequent slices.

27. The method according to claim 26, wherein: The context state includes one or more context information, and the one or more context information includes an initial probability value, an adaptation rate, and an adaptation probability weight.

28. The method of claim 26, further comprising: A context state storage location is signaled by the encoder, wherein the context state storage location indicates the fixed position in the slice.

29. The method according to claim 28, further comprising: The context state storage location is signaled by the encoder in a bitstream at a certain level, wherein the certain level includes a picture parameter set (PPS) level, a sequence parameter set (SPS) level, a picture level, a slice level, a coding tree unit (CTU) level, or a coding block group level.

30. The method of claim 28, wherein: The context state storage location is predefined at one of the following locations: A position in a coding tree unit CTU in the slice; or The last position of a CTU row.

31. The method of claim 26, further comprising: signaling, by the encoder, a control syntax element indicating whether context state inheritance for inter slices is allowed; as well as In response to determining to enable a control syntax element, a context state storage location syntax element is signaled by the encoder indicating a context state storage location, the context state storage location indicating the fixed position in the slice.

32. The method of claim 26, further comprising: The fixed position is predefined by the encoder to be located at the last position of the last coding tree unit CTU in the slice or the middle position of the middle CTU in the slice.

33. The method of claim 32, further comprising: signaling, by the encoder, a stored context state syntax element indicating where the fixed position is located; In response to determining that the stored context state syntax element is equal to 0, obtaining, by the encoder, the fixed position from a middle position of a middle CTU in the slice; as well as In response to determining that the stored context state syntax element is equal to 1, the fixed position is obtained, by the encoder, from a last position of a last CTU in the slice.

34. The method of claim 26, wherein: The slice and the current slice are not located in the same picture.

35. An apparatus for video decoding, comprising: one or more processors; as well as a memory coupled to the one or more processors and configured to store instructions executable by the one or more processors, Wherein, when executing the instructions, the one or more processors are configured to perform the method according to any one of claims 1-8 and 17-25.

36. An apparatus for video encoding, comprising: one or more processors; as well as a memory coupled to the one or more processors and configured to store instructions executable by the one or more processors, Wherein, when executing the instructions, the one or more processors are configured to perform the method according to any one of claims 9-16 and 26-34.

37. A non-transitory computer-readable storage medium for storing computer-executable instructions, which, when executed by one or more computer processors, cause the one or more computer processors to receive a bitstream and perform the method of any one of claims 1-8 and 17-25 based on the bitstream.

38. A non-transitory computer-readable storage medium for storing computer-executable instructions, which, when executed by one or more computer processors, cause the one or more computer processors to perform the method according to any one of claims 9-16 and 26-34 to encode a current slice into a bitstream and send the bitstream.