Entropy coding and decoding method and device for scalable video coding and decoding

By using multiple context state buffers in the video encoding and decoding system to store the context states of different time sublayers and layers, and initialize them according to the current time sublayer and layer ID, the problem of entropy encoding and decoding performance improvement space in the prior art is solved, and more efficient entropy encoding and decoding performance is achieved.

CN119895876APending Publication Date: 2025-04-25MEDIATEK INC
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202380062084.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Priority Date
2022-08-25
Filing Date
2023-07-12
Publication Date
2025-04-25

AI Technical Summary

Technical Problem

In existing video encoding and decoding systems, there is room for improvement in entropy encoding and decoding performance, especially in multi-time sub-layer and multi-layer inter-frame encoding and decoding scenarios.

Method used

Multiple context state buffers are used to store the previous context states of different time sublayers and layers respectively, and the current context state set of the arithmetic entropy codec is initialized according to the current time sublayer and layer ID. This allows initialization using a set of stored context states with lower ID values ​​than the current time sublayer and layer IDs to improve entropy codec performance.

Benefits of technology

Through effective context state management and initialization, the entropy encoding and codec performance of video encoding and codec systems is improved, especially in multi-time sub-layer and multi-layer inter-frame encoding and codec scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119895876A_ABST
    Figure CN119895876A_ABST
Patent Text Reader

Abstract

The invention discloses a context initialization method and device for entropy coding and decoding. According to one method, previous context states of an arithmetic entropy codec derived from one or more previous slices are determined, where the previous context states are stored in a plurality of context state buffers, and different context state buffers are used to store the previous context states of different temporal sub-layers. A target context state is determined according to a previous context state of a current slice in the current time sub-layer indicated by the current time ID, wherein a target context state buffer storing the target context state is determined according to the current time ID. A current context state set of the arithmetic entropy codec is initialized using the target context state. After initializing the current context state set of the arithmetic entropy codec, the input data is encoded or decoded using the arithmetic entropy codec.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] Cross-references

[0002] This application is a non-provisional application of, and claims priority to, U.S. Provisional Patent Application No. 63 / 373,472, filed on August 25, 2022. This U.S. Provisional Patent Application is incorporated herein by reference in its entirety. Technical Field

[0003] The present invention relates to a video coding system, and in particular to context initialization for entropy coding in the video coding system to improve coding performance. Background Art

[0004] Versatile Video Codec (VVC) is the latest international video codec standard developed by the Joint Video Experts Group (JVET) of the ITU-T Video Coding Experts Group (VCEG) and the ISO / IEC Moving Picture Experts Group (MPEG). The standard has been published as an ISO standard: ISO / IEC 23090-3:2021, Information technology - Codec representation of immersive media - Part 3: Versatile video codec, published in February 2021. VVC is developed based on its predecessor HEVC (High Efficiency Video coding), by adding more codec tools to improve codec efficiency and handle various video sources including 3D video signals.

[0005] Figure 1AAn exemplary adaptive inter / intra video decoding system incorporating loop processing is described. For intra prediction, prediction data is derived based on previously encoded video data in the current picture. For inter prediction 112, motion estimation (ME) is performed on the encoder side and motion compensation (MC) is performed based on the results of ME to provide prediction data derived from other pictures and motion data. Switch 114 selects intra prediction 110 or inter prediction 112, and the selected prediction data is provided to adder 116 to form a prediction error, also called a residual. The prediction error is then processed by transform (T) 118 and subsequent quantization (Q) 120. The transformed and quantized residual is then encoded by entropy encoder 122 to include it in a video bit stream corresponding to the compressed video data. The bit stream associated with the transform coefficients is then packaged with auxiliary information such as motion and coding modes associated with intra prediction and inter prediction, as well as other information such as parameters associated with loop filters applied to underlying image areas. As Figure 1A As shown, side information associated with intra prediction 110, inter prediction 112 and loop filter 130 is provided to entropy encoder 122. When using inter prediction mode, the reference picture must also be reconstructed at the encoder end. Therefore, the transformed and quantized residual is processed by inverse quantization (IQ) 124 and inverse transform (IT) 126 to restore the residual. The residual is then added back to the predicted data 136 in reconstruction (REC) 128 to reconstruct the video data. The reconstructed video data can be stored in the reference picture buffer 134 and used for prediction of other frames.

[0006] like Figure 1A As shown, the input video data undergoes a series of processes in the encoding system. Due to the series of processes, the reconstructed video data from REC 128 may be subject to various impairments. Therefore, before the reconstructed video data is stored in the reference picture buffer 134, a loop filter 130 is often applied to the reconstructed video data to improve the video quality. For example, a deblocking filter (DF), a sample adaptive offset (SAO), and an adaptive loop filter (ALF) may be used. It may be necessary to merge the loop filter information into the bitstream so that the decoder can correctly recover the required information. Therefore, the loop filter information is also provided to the entropy encoder 122 to be incorporated into the bitstream. Figure 1A In FIG. 1 , a loop filter 130 is applied to the reconstructed video before the reconstructed samples are stored in a reference picture buffer 134 . Figure 1AThe system in is intended to illustrate an exemplary structure of a typical video encoder. It may correspond to a High Efficiency Video Coding (HEVC) system, VP8, VP9, ​​H.264, or VVC.

[0007] like Figure 1B As shown, the decoder can use similar or partially identical functional blocks as the encoder, except for transform 118 and quantization 120, because the decoder only needs inverse quantization 124 and inverse transform 126. Instead of entropy encoder 122, the decoder uses entropy decoder 140 to decode the video bit stream into quantized transform coefficients and required decoding information (e.g., ILPF information, intra prediction information, and inter prediction information). Intra prediction 150 on the decoder side does not need to perform pattern search. Instead, the decoder only needs to generate intra prediction based on the intra prediction information received from entropy decoder 140. In addition, for inter prediction, the decoder only needs to perform motion compensation (MC 152) based on the intra prediction information received from entropy decoder 140 without motion estimation.

[0008] The coded video sequence can be represented by a set of coded layered video sequences. Layered coding is intended for scalable coding and decoding, such as scalable quality and / or scalable resolution. Layered coding can also be applied to multi-view coding and decoding, where different layers correspond to different views. The coded layered video sequence can be further divided into multiple time sub-layers. Each coded video data unit belongs to a specific layer identified by a layer index (ID) and a specific sub-layer ID identified by a time ID. Both the layer ID and the sub-layer ID are signaled in the network abstraction layer (abbreviated as NAL) header. By skipping video data units belonging to one or more top layers or sub-layers, the coded video sequence can be restored at a reduced quality or frame rate. The video parameter set (VPS), sequence parameter set (SPS) and picture parameter set (PPS) contain high-level syntax elements applicable to coded video sequences, coded layered video sequences and coded pictures, respectively. The picture header (PH) and the slice header (SH) contain high-level syntax elements applicable to the current coded image and the current coded slice, respectively.

[0009] In VVC, the coded picture is divided into non-overlapped square block areas represented by associated codec tree units (CTUs). A coded picture can be represented by a set of slices, each slice comprising an integer number of CTUs. Each CTU in a slice is processed in raster scan order. Bidirectional prediction (B) slices can be decoded using intra prediction or inter prediction with up to two motion vectors and reference indices to predict the sample values ​​of each block. Prediction (P) slices are decoded using intra prediction or inter prediction with up to one motion vector and reference index to predict the sample values ​​of each block. Intra (I) slices are decoded using only intra prediction.

[0010] A quadtree (QT) with a nested multi-type-tree (MTT) structure can be used to divide a CTU into one or more non-overlapping codec units (CUs) to accommodate various local motion and texture characteristics. Figure 2 One of the five split types shown (quad-tree partitioning 210, vertical binary tree partitioning 220, horizontal binary tree partitioning 230, vertical center-side triple-tree partitioning 240, horizontal center-side triple-tree partitioning 250) further splits the CU into smaller CUs. Figure 3An example of a CTU recursively partitioned by a QT with a nested MTT is provided. Each CU contains one or more prediction units (PUs). The prediction unit, together with the associated CU syntax, serves as a basic unit for sending prediction sub-information. The specified prediction process is used to predict the values ​​of related pixel samples within the PU. Each CU may contain one or more transform units (TUs) for representing a prediction residual block. The transform unit (TU) includes a transform block (TB) of luma samples and two corresponding transform blocks of chroma samples, and each TB corresponds to a residual sample block from one color component. An integer transform is applied to the transform block. The level values ​​of the quantized coefficients are entropy encoded and decoded in the bitstream together with other auxiliary information. The terms codec tree block (CTB), codec block (CB), prediction block (PB), and transform block (TB) are defined as a two-dimensional sample array specifying a color component associated with a CTU, CU, PU, ​​and TU, respectively. Therefore, a CTU consists of a luma CTB, two chroma CTBs, and related syntax elements. Similar relationships apply to CUs, PUs, and TUs.

[0011] In order to achieve high compression efficiency, the context-based adaptive binary arithmetic coding and decoding (CABAC) mode, or normal mode, is adopted to perform entropy coding and decoding on the values ​​of syntax elements in HEVC and VVC. Figure 4 An exemplary block diagram of a CABAC process is illustrated. Since the arithmetic codec in the CABAC engine can only encode and decode binary symbol values, the CABAC process requires the use of a binarizer (410) to convert the value of the syntactic element into a binary string. The conversion process is usually called binarization. During the encoding and decoding process, a probability model is gradually established by encoding and decoding symbols of different contexts. A context modeler (420) is used for modeling purposes. In the encoding and decoding process based on normal context, a conventional encoding and decoding engine (430) corresponding to the binary arithmetic codec is used. The selection of the modeling context for the next binary symbol can be determined by the encoding and decoding information. Symbols can also be nj-encoded without a context modeling stage and assuming an equal probability distribution, which is usually called bypass mode to reduce complexity. For bypassed symbols, a bypass encoding and decoding engine (440) can be used. As Figure 4 As shown, switches (S1, S2, and S3) are used to direct the data flow between the conventional CABAC mode and the bypass mode. When the conventional CABAC mode is selected, the switch is switched to the upper contact. When the bypass mode is selected, the switch is flipped to the lower contact, as shown in FIG. Figure 4 shown.

[0012] In order to achieve high compression efficiency, the context-based adaptive binary arithmetic coding (CABAC) mode (or regular mode) is used to entropy encode and decode the values ​​of syntax elements in VVC. Since the arithmetic encoder in the CABAC engine can only encode and decode binary symbol values, the CABAC operation first needs to convert the values ​​of the syntax elements into binary strings, a process usually called binarization. During the encoding and decoding process, an accurate probability model is gradually established from the coded symbols of different contexts. A set of storage units is allocated to track the ongoing context states of each modeling context, including the accumulated probability states. The context state is initialized using predefined modeling parameters for each context according to the specified slice QP. The selection of a specific modeling context for encoding binary symbols can be determined by predefined rules or derived from coding information. Symbols can be encoded without a context modeling stage and assuming equal probability distribution, usually called bypass mode, to improve the bitstream parsing throughput.

[0013] The Joint Video Experts Group (JVET) of ITU-T SG16 WP3 and ISO / IEC JTC1 / SC29 is currently exploring the next generation of video codec standards. Some promising new codec tools have been adopted into Enhanced Compression Model 5 (ECM 5) (M. Coban et al., "Algorithm description of Enhanced Compression Model", Joint Video Experts Group (JVET) of ITU-TSG 16 WP 3 and ISO / IEC JTC 1 / SC 29, 26th Meeting, by Teleconference, April 20-29, 2022, document JVET-Z2025) to further improve VVC. The adopted new tools have been implemented in the reference software ECM-5.0 (available online: https: / / vcgit.hhi.fraunhofer.de / ecm / ECM).

[0014] The present invention aims to further improve the CABAC entropy encoding and decoding performance in a video encoding and decoding system. Summary of the invention

[0015] A method and device for context initialization of entropy coding and decoding are disclosed. According to the method, input data is received, wherein the input data includes binary symbols of a group of syntax elements associated with a current slice in a current picture on the encoder side, or an entropy coded bit stream of the binary symbols of the group of syntax elements on the decoder side, wherein the current picture uses multiple time sub-layers for inter-frame coding and decoding. A previous context state obtained from one or more previous slices of an arithmetic entropy codec is determined, wherein the previous context state is stored in multiple context state buffers, and different context state buffers are used to store the previous context states of different time sub-layers. A target context state is determined according to the previous context state of the current slice in the current time sub-layer indicated by the current time ID, wherein the target context state buffer storing the target context state is determined according to the current time ID. A current context state set of the arithmetic entropy codec is initialized using the target context state. After initializing the current context state set for the arithmetic entropy codec, the input data is encoded or decoded using the arithmetic entropy codec.

[0016] In one embodiment, each context state buffer stores only the one or more sets of context states generated by a coded picture having a target temporal sub-layer ID.

[0017] In one embodiment, the context state buffer corresponds to a two-dimensional array of context state buffers with slice type as a first dimension and temporal sub-layer ID as a second dimension.

[0018] In one embodiment, different context state buffers have different maximum context state buffer sizes.

[0019] In one embodiment, the current picture is also inter-coded using multiple layers, and the different context state buffers are also used to store previous context states of different layers, wherein a target context state buffer containing a target context state of a current slice in the current layer indicated by the current layer ID is further determined according to the current layer ID. In one embodiment, each of the multiple context state buffers stores only previous context states generated from a coded picture associated with one temporal ID and one target layer ID. In one embodiment, the multiple context state buffers correspond to a three-dimensional array of context state buffers, with slice type as a first dimension, temporal ID as a second dimension, and layer ID as a third dimension.

[0020] In one embodiment, the method includes storing the current context state set generated by the encoding or decoding input data in multiple context state buffers if the current slice meets the predefined position in the current picture. For example, the predefined position corresponds to the last slice in the current picture. In another example, the predefined position corresponds to the center slice in the current picture. In one embodiment, after entropy encoding and decoding the current slice with the current time ID, the current context state set is stored in a selected context state buffer with a corresponding time ID equal to the current time ID. In one embodiment, if the selected context state buffer with a corresponding time ID equal to the current time ID is full, one buffer entry in the multiple context state buffers is cleared before storing the current context state set.

[0021] According to another method, input data is received, wherein the input data includes binary symbols of a set of syntax elements associated with a current slice in a current picture on the encoder side, or an entropy coded bitstream of binary symbols of a set of syntax elements on the decoder side, wherein the current picture is inter-coded with multiple temporal sublayers. A previous context state of an arithmetic entropy codec is determined, wherein the previous context state is derived from entropy coding one or more previous slices and is stored in a context state buffer of the one or more previous slices of the same slice type. A target context state is determined for a current slice with a current time ID from the previous context states stored in the context state buffer, wherein the target context state is associated with the target time ID and the target time ID is allowed to be less than the current time ID. A current context state set of an arithmetic entropy codec is initialized using the target context state. After initializing the current context state set of the arithmetic entropy codec, the input data is encoded or decoded using the arithmetic entropy codec.

[0022] In one embodiment, the current slice is encoded with a current QP (quantization parameter), and the target context state is associated with the target QP, wherein the absolute difference between the current QP and the target QP is less than a threshold, and the threshold is a non-negative integer. In one embodiment, the threshold is signaled or parsed in an SPS (sequence parameter set), a PPS (picture parameter set), a PH (picture header), a SH (slice header), or a combination thereof. In another embodiment, the threshold is predefined.

[0023] In one embodiment, if the current slice satisfies a predefined position in the current picture, the method further includes storing the current context state set generated by the encoding or decoding input data in a context state buffer. For example, the predefined position corresponds to the last slice in the current picture. In another example, the predefined position corresponds to the center slice in the current picture. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] Figure 1A An exemplary adaptive inter / intra video decoding system incorporating loop processing is shown.

[0025] Figure 1B Another example decoding system is shown.

[0026] Figure 2 A schematic diagram showing five types of splitting.

[0027] Figure 3 An example of a CTU recursively partitioned by a QT with a nested MTT is provided.

[0028] Figure 4 An exemplary block diagram of a CABAC process is illustrated.

[0029] Figure 5 A flow chart of an exemplary video codec system including entropy codec with separate context state buffers for different temporal sub-layers according to an embodiment of the present invention is shown.

[0030] Figure 6 A flow chart of an exemplary video coding system according to an embodiment of the present invention is shown that allows initialization of entropy coding using a stored context state set having a lower temporal ID value than a current temporal ID value. DETAILED DESCRIPTION

[0031] It will be readily understood that, as generally described and illustrated in the accompanying drawings herein, the components of the present invention may be arranged and designed into a variety of different configurations. Therefore, the following more detailed description of the embodiments of the systems and methods of the present invention as represented in the accompanying drawings is not intended to limit the scope of the claimed invention, but merely represents selected embodiments of the present invention. References to "one embodiment," "embodiment," or similar language throughout the specification mean that a particular feature, structure, or characteristic described in conjunction with the embodiment may be included in at least one embodiment of the present invention. Therefore, the phrases "in one embodiment" or "in an embodiment" appearing in various places throughout the specification do not necessarily all refer to the same embodiment.

[0032] In addition, the described features, structures or characteristics can be combined in any suitable manner in one or more embodiments. However, those skilled in the relevant art will recognize that the present invention can be practiced without one or more specific details, or using other methods, components, etc. In other cases, well-known structures or operations are not shown or displayed. Detailed description to avoid blurring aspects of the present invention. The illustrated embodiments of the present invention will be best understood by reference to the accompanying drawings, in which the same parts are represented by the same numbers throughout. The following description is only by way of example, and simply describes certain selected embodiments of the apparatus and method consistent with the present invention as claimed herein.

[0033] In ECM 5, the context state set after entropy encoding the last CTU in the coded inter-frame picture can be used to initialize the context state set so as to entropy encode the future frame inter-frame slices with the same slice type, quantization parameter (QP) and temporal ID (TID) as the coded picture. A new set of context states after entropy encoding the current inter-frame picture is stored in a specified entry of a context state buffer in the video encoder. When a set of stored context states generated by entropy encoding the previous frame inter-frame slice with the same slice type, QP and TID as the current picture can be found in the context state buffer, the new set of context states only replaces the stored context state set corresponding to the same slice type, QP and TID in the context state buffer. Otherwise, a new set of context states will be allocated to be stored in an empty entry in the context state buffer. When the context state buffer is full, the stored context set associated with the entry with the smallest QP and temporal ID is first deleted from the context state buffer, and then the new context state set is stored. In the ECM-5.0 reference software implementation, context state buffers ctxStateBuffers[NumInterSliceTypes] are created to store context state sets corresponding to different slice types, where NumInterSliceTypes represents the number of different slice types and is equal to 2 (referring to B and P slice types in ECM 5). Each context state buffer stores a context state set generated by entropy encoding the slices in the previous picture using a specific slice type. For each of the two context state buffers, the maximum allowed buffer size is fixed to be equal to 5 (context state sets). The context state for each context in the storage set may include entries for tracking long-term probabilities, short-term probabilities, and weighting factors for deriving predicted probabilities.

[0034] Before starting entropy encoding of the current inter-frame slice, the ECM 5 video encoder will first search the context state buffer for a stored context state set with the same slice type, QP and TID as the current slice. In the present disclosure, slice type, QP and TID are referred to as coding parameters. Therefore, a set of context states is stored for each coding parameter combination (i.e., slice type, QP and TID). If such a storage set can be found, the video encoder copies each context state in the storage set to the corresponding context state in the current slice. Otherwise, the context state set in the current slice is not initialized by any stored context state set in the context state buffer. The context state in the current slice is initialized only by the predefined default method in VVC.

[0035] In ECM-5.0, each context state buffer is used to store context state sets generated from coded slices of a specific slice type. Context state sets corresponding to the same slice type and different TIDs are stored in one context buffer. When the context state buffer is full, after entropy encoding the current picture, a storage entry needs to be removed from the context state buffer to store a new context state set. However, when the decoder does not decode coded pictures corresponding to one or more higher temporal sublayers (indicated by the TID associated with each coded picture), the number of storage sets generated from the coded picture will decrease. Therefore, the context state buffer full status between the encoder and the decoder may not be synchronized.

[0036] In a proposed method, a video codec may maintain separate context state buffers for different temporal sublayers. Each context state buffer stores only a set of context states generated from a coded picture corresponding to a specific TID in a coded video sequence. In order to store a new set of context states after entropy encoding a current slice having a TID value equal to TemporalIdc, the video codec searches for an empty entry in the context state buffer corresponding to TemporalIdc. When the buffer corresponding to TemporalIdc is full, it clears a buffer entry for storing a new set of context states. In one embodiment, the video codec may create a two-dimensional array of context state buffers ctxStateBuffers[NumSubLayers][NumInterSliceTypes] for storing context state sets corresponding to different TIDs and slice types, where NumSubLayers represents the number of temporal sublayers in the coded video sequence. Each context state buffer ctxStateBuffers[TemporalId][SliceType] stores only the set of context states generated by entropy encoding all inter-frame slices with a TID value equal to TemporalId and whose slice type value is equal to SliceType. The video codec can set different maximum context state buffer size values ​​for different context state buffers, where the maximum context state buffer size can be predefined or explicitly signaled in the bitstream, such as in the SPS or PPS. In ECM 5, two context state buffers are used for B slices and P slices, where context statistics are collected based on the picture type (i.e., B and P) of the slice. Slices can be generated based on other picture partitions.

[0037] According to one aspect of the present invention, the video codec may also allow context initialization using a stored context state set having a lower TID value than the TID value of the current picture. In this way, the video coder may further increase the chance of using a stored context state set generated from a previously encoded picture to initialize the context state for entropy encoding the current picture. The video codec may also include specifying a threshold TL0, where TL0 is a non-negative integer. Considering the current slice has a QP equal to c The QP value is equal to temporaryID c The time ID value, and the QP k The QP value is equal to temporaryID k The storage context set k is generated by entropy encoding the previous inter-frame slice with the temporal ID value of c and QP kThe absolute difference between is less than or equal to TL0 and temporaryID k Less than temporaryID c When , it is possible to use the stored context set k to initialize the context state for entropy encoding the current slice.

[0038] In one embodiment, after entropy encoding the last slice in the current picture, the current context state can be stored in a context buffer to initialize the entropy codec of the next picture. While storing the context state of the last slice in the current picture, the context state associated with another slice position within the picture can be stored. For example, the context state of the center slice in the current picture can be stored instead of the context state of the last slice.

[0039] When multiple stored context sets are allowed, the video codec may select a stored context set from the multiple stored sets by some predefined method. In some embodiments, the video encoder may consider the TID, QP, decoding order, or POC corresponding to each of the multiple stored sets to determine the selected set for initializing the context state in the current picture. For example, the video encoder may first select the context state with the closest temporal ID c In some embodiments, the video encoder will always first select a storage set with the same slice type, QP, and TID as the current slice before considering other storage sets corresponding to different TID values. The value of the specified threshold TL0 may be predefined or signaled in the bitstream, such as in the SPS or PPS. In some embodiments, different TL0 values ​​may be specified and derived for entropy coded inter slices corresponding to different slice types and TIDs.

[0040] According to another aspect of the invention, the video codec may further include explicitly signaling one or more syntax elements for deriving selected one or more stored context state sets for initializing the context state of the current slice. The video encoder may further include explicitly signaling one or more syntax elements for deriving selected one or more stored context state sets to be retained in or removed from the context state buffer. The one or more selected stored context state sets may be derived by signaling information related to the slice type, QP, picture order count (POC), and / or buffer entry index associated with each of the one or more selected storage sets, or derived by other predefined methods.

[0041] In the proposed method, when the coded video sequence is coded into multiple layers, the video codec may further include maintaining separate context state buffers for different layers and temporal sub-layers. Each context state buffer stores only a set of context states generated from a coded picture corresponding to a specific layer ID and a specific TID in the coded video sequence. In one embodiment, the video codec may create a three-dimensional array of context state buffers, such as

[0042] ctxStateBuffers[NumLayers][NumSubLayers][NumInterSliceTypes] is used to store context state sets corresponding to different layer IDs, TIDs, and slice types, where NumLayers represents the number of layers in the coded video sequence. Each context state buffer

[0043] ctxStateBuffers[LayerId][TemporalId][SliceType] stores only the set of context states generated by entropy coded inter slices whose layer index value is equal to LayerId, TID value is equal to TemporalId, and slice type is equal to SliceType. The video codec can set different maximum context state buffer size values ​​for different context state buffers, where the maximum context state buffer size can be predefined or explicitly signaled in the bitstream, such as in SPS or PPS.

[0044] When the coded video sequence is coded into multiple layers, the video codec may also allow context initialization using a stored context state set with a layer ID lower than the current picture. The proposed scheme and embodiment of using a stored context state set with a lower TID value than the current slice for context initialization may similarly apply a stored context state set with a layer ID lower than the current slice.

[0045] In ECM-5.0, two context state buffers are allocated to store context state sets generated by entropy coding B slices and P slices respectively. Each context state buffer can store up to five sets of context states for each inter-frame slice type. However, it is common for inter-frame slice types to be unevenly distributed in the bitstream. According to another aspect of the present invention, the video codec can share the total context state buffer size budget between different slice types. In this way, when an inter-frame slice type is not used in the current bitstream, another inter-slice type can use the total context state buffer size budget. According to another aspect of the present invention, each context state buffer can store context state sets generated by slices encoded and decoded with different slice types in the video encoder. In this way, context state sets generated from two different slices can share a context buffer. According to another aspect of the present invention, the video codec can also allow context initialization using a stored context state set with a slice type different from the current slice type.

[0046] The proposed method may be jointly supported in a video codec.The video codec may also include one or more high-level syntax elements in a signaling high-level syntax set, such as SPS, PPS, PH and SH, to indicate which method is selected for context initialization in the current video sequence.

[0047] Any of the aforementioned proposed entropy coding and decoding methods, wherein there are separate context state buffers for different temporal sub-layers, or the entropy coding and decoding is initialized using a stored context state set having a temporal ID value lower than the current temporal ID value, can be implemented in an encoder and / or a decoder. For example, any of the proposed entropy coding and decoding methods can be implemented in an entropy coding and decoding module (e.g., Figure 1A The entropy encoder 122 in the decoder) and / or the entropy coding and decoding module of the decoder (e.g., Figure 1B Alternatively, any proposed method may be implemented as a circuit integrated into an entropy coding and decoding module of an encoder and / or an entropy coding and decoding module of a decoder. The proposed aspects, methods and related embodiments may be implemented individually and jointly in a video coding and decoding system.

[0048] Figure 5A flowchart of an exemplary video codec system according to an embodiment of the present invention is shown, the system including an entropy codec with separate context state buffers for different temporal sub-layers. The steps shown in the flowchart can be implemented as program codes that can be executed on one or more processors (e.g., one or more CPUs) on the encoder / decoder side. The steps shown in the flowchart can also be implemented based on hardware, such as one or more electronic devices or processors, which are arranged to perform the steps in the flowchart. According to the method, input data is received in step 510, wherein the input data includes binary symbols of a set of syntax elements associated with a current slice in a current picture on the encoder side, or an entropy coded bitstream of binary symbols of a set of syntax elements on the decoder side, wherein the current picture is inter-coded using multiple temporal sub-layers. In step 520, a previous context state derived from one or more previous slices is determined for an arithmetic entropy codec, wherein the previous context state is stored in multiple context state buffers, and different context state buffers are used to store previous context states of different temporal sub-layers. In step 530, a target context state is determined for a current slice in a current temporal sublayer indicated by a current temporal ID based on a previous context state, wherein a target context state buffer storing the target context state is determined based on the current temporal ID. In step 540, a current context state set of an arithmetic entropy codec is initialized using the target context state. After initializing the current context state set of the arithmetic entropy codec, in step 550, the input data is encoded or decoded using the arithmetic entropy codec.

[0049] Figure 6A flowchart of an exemplary video codec system according to an embodiment of the present invention is shown, which allows entropy coding to be initialized using a stored context state set with a time ID value lower than the current time ID value. According to the method, input receives data in step 610, wherein, at the encoder side, the input data includes a set of binary symbols of syntax elements associated with a current slice in a current image, or at the decoder side, an entropy coded bitstream of the binary symbols of the set of syntax elements, wherein the current image is inter-coded with multiple temporal sub-layers. In step 620, a previous context state of the arithmetic entropy encoder is determined, wherein the previous context state is obtained from entropy coding and decoding one or more previous slices and stored in a context state buffer of the one or more previous slices with the same slice type. In step 630, a target context state is determined for the current slice with the current time ID from the previous context state stored in the context state buffer, wherein the target context state is associated with the target time ID, and the target time ID is allowed to be less than the current time ID. In step 640, the current context state set of the arithmetic entropy codec is initialized using the target context state. After initializing the current context state set of the arithmetic entropy codec, in step 650, the input data is encoded or decoded using the arithmetic entropy codec.

[0050] The flowchart shown is intended to illustrate an example of video coding according to the present invention. Those skilled in the art may modify each step, rearrange the steps, split the steps or merge the steps to practice the present invention without departing from the spirit of the present invention. In the present disclosure, specific syntax and semantics have been used to illustrate examples of implementing embodiments of the present invention. Those skilled in the art may practice the present invention by replacing syntax and semantics with equivalent syntax and semantics without departing from the spirit of the present invention.

[0051] The above description is to enable those of ordinary skill in the art to practice the present invention in the context of specific applications and their requirements. It will be clear to those skilled in the art that various modifications may be made to the described embodiments, and that the general principles defined herein may be applied to other embodiments. Therefore, the present invention is not limited to the specific embodiments shown and described, but should be given the widest scope consistent with the principles and novel features disclosed herein. In the above detailed description, various specific details are shown in order to provide a thorough understanding of the present invention. However, it will be understood by those skilled in the art that the present invention can be put into practice.

[0052] The embodiments of the present invention as described above can be implemented with various hardware, software codes or a combination of the two. For example, one embodiment of the present invention can be one or more circuits integrated into a video compression chip or integrated into video compression software to perform the program code for the processing described herein. The embodiments of the present invention can also be program codes to be executed on a digital signal processor (DSP) to perform the processing described herein. The present invention can also be related to many functions performed by a computer processor, a digital signal processor, a microprocessor or a field programmable gate array (FPGA). These processors can be configured to perform specific tasks according to the present invention by executing machine-readable software codes or firmware codes that define the specific methods embodied in the present invention. The software code or firmware code can be developed in different program languages ​​and different formats or styles. The software code can also be compiled for different target platforms. However, the different code formats, styles and languages ​​of the software code and other ways of configuring the code to perform tasks according to the present invention will not depart from the spirit and scope of the present invention.

[0053] The present invention may be embodied in other specific forms without departing from its spirit or essential characteristics. The described examples are considered to be illustrative and not restrictive in all respects. Therefore, the scope of the present invention is indicated by the appended claims rather than by the foregoing description. All changes within the equivalent meaning and scope of the claims should be included within their scope.

Claims

1. A video encoding and decoding method, the method comprising: Receiving input data, wherein the input data comprises binary symbols of a set of syntax elements associated with a current slice in a current picture at an encoder side, or an entropy coded bitstream of the binary symbols of the set of syntax elements at a decoder side, wherein the current picture is inter-coded and decoded using a plurality of temporal sub-layers; determining a plurality of previous context states derived from one or more previous slices for use in an arithmetic entropy codec, wherein the plurality of previous context states are stored in a plurality of context state buffers, and different context state buffers are used to store the plurality of previous context states for different temporal sub-layers; determining a target context state for the current slice in the current temporal sublayer indicated by the current temporal ID based on the multiple previous context states, wherein a target context state buffer storing the multiple target context states is determined based on the current temporal ID; Initializing a current set of context states of the arithmetic entropy codec using the plurality of target context states; and After initializing the current context state set of the arithmetic entropy codec, the input data is encoded or decoded using the arithmetic entropy codec.

2. The method according to claim 1, characterized in that Each of the plurality of context state buffers stores only the one or more sets of context states generated by the coded picture having the target temporal ID.

3. The method according to claim 1, characterized in that The plurality of context state buffers corresponds to a two-dimensional array of context state buffers having a slice type as a first dimension and a time ID as a second dimension.

4. The method according to claim 1, characterized in that: The different context state buffers have different maximum context state buffer sizes.

5. The method according to claim 1, characterized in that The current image also uses multiple layers for inter-frame coding and decoding, and the different context state buffers are also used to store previous context states of different layers, and wherein the target context state buffer containing the multiple target context states of the current slice in the current layer indicated by the current layer ID is further determined according to the current layer ID. 6 . The method of claim 5 , wherein each of the plurality of context state buffers stores only previous context states generated from coded pictures associated with one temporal ID and one target layer ID.

7. The method of claim 5, wherein the plurality of context state buffers corresponds to a three-dimensional array of context state buffers with slice type as a first dimension, time ID as a second dimension, and layer ID as a third dimension.

8. The method according to claim 1, further comprising: If the current slice satisfies a predefined position in the current picture, the current context state set generated by encoding or decoding the input data is stored in the plurality of context state buffers. 9 . The method according to claim 8 , wherein the predefined position corresponds to the last slice in the current picture.

10. The method according to claim 8, characterized in that The predefined position corresponds to a center slice in the current picture.

11. The method according to claim 8, characterized in that After entropy encoding and decoding the current slice with the current time ID, the current context state set is stored in a selected context state buffer with a corresponding time ID equal to the current time ID.

12. The method according to claim 11, characterized in that If the selected context state buffer having the corresponding time ID equal to the current time ID is full, then a buffer entry in the plurality of context state buffers is flushed before storing the current context state set.

13. A video coding and decoding apparatus, the apparatus comprising one or more electronic circuits or processors, the electronic circuits or processors being arranged to: Receive input data, where The input data includes binary symbols of a set of syntax elements associated with a current slice in a current picture at an encoder, or an entropy coded bitstream of the binary symbols of the set of syntax elements at a decoder, wherein the current picture is inter-coded using multiple temporal sub-layers; determining a plurality of previous context states derived from one or more previous slices for use in an arithmetic entropy codec, wherein the plurality of previous context states are stored in a plurality of context state buffers, and different context state buffers are used to store the plurality of previous context states for different temporal sub-layers; determining a target context state for the current slice in the current temporal sublayer indicated by the current temporal ID based on the multiple previous context states, wherein a target context state buffer storing the multiple target context states is determined based on the current temporal ID; Initializing a current set of context states of the arithmetic entropy codec using the plurality of target context states; and After initializing the current context state set of the arithmetic entropy codec, the input data is encoded or decoded using the arithmetic entropy codec.

14. A video decoding method, the method comprising: Receiving input data, wherein the input data comprises binary symbols of a set of syntax elements associated with a current slice in a current picture at an encoder side, or an entropy coded bitstream of the binary symbols of the set of syntax elements at a decoder side, wherein the current picture is inter-coded and decoded using a plurality of temporal sub-layers; determining a previous context state of an arithmetic entropy codec, wherein the previous context state is derived from one or more previous slices and stored in a context state buffer of one or more previous slices of the same slice type; Determining a target context state of the current slice having a current time ID according to the previous context state stored in the context state buffer, wherein the target context state is associated with the target time ID and the target time ID is allowed to be less than the current time ID; Initialize the current context state set of the arithmetic entropy codec using the target context state; and After initializing the current context state set of the arithmetic entropy codec, the input data is encoded or decoded using the arithmetic entropy codec.

15. The method according to claim 14, characterized in that The current slice is encoded with a current QP (quantization parameter), and the target context state is associated with a target QP, and wherein an absolute difference between the current QP and the target QP is less than a threshold, and the threshold is a non-negative integer.

16. The method according to claim 15, characterized in that The threshold is signaled or parsed in the SPS (sequence parameter set), PPS (picture parameter set), PH (picture header), SH (slice header) or a combination thereof.

17. The method according to claim 15, characterized in that This threshold is predefined.

18. The method of claim 14, further comprising: If the current slice satisfies the predefined position in the current picture, the current context state set generated by the encoding or decoding input data is stored in the context state buffer.

19. The method according to claim 18, characterized in that The predefined position corresponds to the last slice in the current picture.

20. The method of claim 18, wherein: The predefined position corresponds to a center slice in the current picture.

21. A video decoding apparatus, the apparatus comprising one or more electronic circuits or processors arranged to: Receive input data, where The input data includes binary symbols of a set of syntax elements associated with a current slice in a current picture at an encoder, or an entropy coded bitstream of the binary symbols of the set of syntax elements at a decoder, wherein the current picture is inter-coded using multiple temporal sub-layers; determining a previous context state of an arithmetic entropy codec, wherein the previous context state is derived from one or more previous slices and stored in a context state buffer of one or more previous slices of the same slice type; Determining a target context state of the current slice having a current time ID according to the previous context state stored in the context state buffer, wherein the target context state is associated with the target time ID and the target time ID is allowed to be less than the current time ID; Initialize the current context state set of the arithmetic entropy codec using the target context state; and After initializing the current context state set of the arithmetic entropy codec, the input data is encoded or decoded using the arithmetic entropy codec.