Decoding and encoding method for video data, and apparatus incorporating the same

By determining contexts for sign prediction syntax elements based on transform type, prediction mode, and component type, the method improves compression efficiency in video coding, addressing the limitations of existing magnitude-based grouping methods.

WO2026242064A1PCT designated stage Publication Date: 2026-11-26SHENZHEN TCL NEW-TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2025/096911
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Filing Date
2025-05-23
Publication Date
2026-11-26

AI Technical Summary

Technical Problem

Existing video coding standards group sign prediction flags based on coefficient magnitude, which is disadvantageous as it does not account for other factors that can group signs with similar probabilities together, leading to inefficiencies in compression efficiency.

Method used

Determine a context for decoding and encoding sign prediction syntax elements based on the type of transform, prediction mode, and component type, rather than solely on coefficient magnitude, to improve the accuracy of sign prediction hypotheses.

Benefits of technology

This approach increases compression efficiency by up to 0.15% for intra-predicted luma components and up to 0.03% for chroma components, enhancing the overall performance of video coding.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2025096911_26112026_PF_FP_ABST
    Figure CN2025096911_26112026_PF_FP_ABST
Patent Text Reader

Abstract

A decoding method and an encoding method for video data, a video coding apparatus and a storage medium are introduced. The decoding method includes: determining a context for decoding a sign prediction syntax element for a transform coefficient based on a type of transform utilized to generate the transform coefficient, wherein the sign prediction syntax element is configured to indicate whether a sign prediction hypothesis is correct for the transform coefficient; and decoding the sign prediction syntax element using the context.
Need to check novelty before this filing date? Find Prior Art

Description

DECODING AND ENCODING METHOD FOR VIDEO DATA, AND APPARATUS INCORPORATING THE SAMETECHNICAL FIELD

[0001] The present disclosure generally relates to encoding and decoding technology, and in particular to a decoding method for video data, an encoding method for video data, a video coding apparatus, and a storage medium.BACKGROUND

[0002] Modern video coding standards, such as H. 265 / HEVC, H. 266 / VVC, and AV1, rely on transform-based residual coding to compactly represent prediction errors in the transform domain. During this process, transform coefficients are quantized and entropy-coded, with their signs typically encoded using context-adaptive binary arithmetic coding (CABAC) or similar techniques. To further improve compression efficiency, recent advancements have introduced sign prediction, where hypotheses about coefficient signs are generated based on reconstructed residuals, and a syntax element (e.g., a flag) signals whether the predicted sign matches the actual value.

[0003] Existing approaches predominantly derive context models for sign prediction based on the magnitude of transform coefficients. For example, coefficients with magnitudes above a threshold (e.g., ≥2) are assigned to a "high-magnitude" group, where sign prediction accuracy is statistically higher due to stronger residual energy, and coefficients with magnitudes below the threshold are classified into a "low-magnitude" group, where sign ambiguity increases, requiring distinct probability estimation.

[0004] This magnitude-based partitioning assumes that larger coefficients exhibit more predictable sign patterns (e.g., correlation with neighboring residuals) , while smaller coefficients exhibit near-random sign distributions.

[0005] However, this method of grouping sign prediction flags based on the magnitude (level) of the coefficient is disadvantageous in certain scenarios as there are other aspects for selecting a context that allow for grouping sign with similar probabilities together.SUMMARY

[0006] Accordingly, the present disclosure aims to provide a decoding method for video data, an encoding method for video data, a video coding apparatus, and a storage medium.

[0007] A technical scheme adopted by the present disclosure is to provide a decoding method for video data. The method includes: determining a context for decoding a sign prediction syntax element for a transform coefficient based on a type of transform utilized to generate the transform coefficient, wherein the sign prediction syntax element is configured to indicate whether a sign prediction hypothesis is correct for the transform coefficient; and decoding the sign prediction syntax element using the context.

[0008] Another technical scheme adopted by the present disclosure is to provide an encoding method for video data. The method includes: determining a context for encoding a sign prediction syntax element for a transform coefficient based on a type of transform utilized to generate the transform coefficient, wherein the sign prediction syntax element is configured to indicate whether a sign prediction hypothesis is correct for the transform coefficient; and encoding the sign prediction syntax element using the context.

[0009] Another technical scheme adopted by the present disclosure is to provide a decoding method for video data. The method includes: determining a context for decoding a sign prediction syntax element for a transform coefficient based on neighboring coefficients of the transform coefficient, wherein the sign prediction syntax element is configured to indicate whether a sign prediction hypothesis is correct for the transform coefficient; and decoding the sign prediction syntax element using the context.

[0010] Another technical scheme adopted by the present disclosure is to provide an encoding method for video data. The method includes: determining a context for encoding a sign prediction syntax element for a transform coefficient based on neighboring coefficients of the transform coefficient, wherein the sign prediction syntax element is configured to indicate whether a sign prediction hypothesis is correct for the transform coefficient; and encoding the sign prediction syntax element using the context.

[0011] Another technical scheme adopted by the present disclosure is to provide a video coding apparatus. The apparatus includes a processor and a memory. The memory is configured to store executable instructions that, when executed by the processor, cause the processor to perform any of the foregoing methods.

[0012] Another technical scheme adopted by the present disclosure is to provide a computer readable medium. The computer readable medium is configured to store executable instructions that, when executed by the processor, cause the processor to perform any of the foregoing methods.BRIEF DESCRIPTION OF THE DRAWINGS

[0013] In order to clearly explain the technical solutions in the embodiments of the present disclosure, the drawings used in the description of the embodiments will be briefly described below. Obviously, the drawings in the following description are merely some embodiments of the present disclosure. For those of ordinary skill in the art, other drawings may also be obtained based on these drawings without any creative work.

[0014] FIG. 1 shows a schematic diagram of a conventional video encoding system.

[0015] FIG. 2 shows a schematic diagram of a conventional video decoding system.

[0016] FIG. 3 illustrates a sign prediction method for residuals.

[0017] FIG. 4 illustrates a flowchart of a decoding method for video data according to an embodiment of the present disclosure.

[0018] FIG. 5 illustrates a flowchart of an encoding method for video data according to an embodiment of the present disclosure.

[0019] FIG. 6 illustrates a flowchart of a decoding method for video data according to another embodiment of the present disclosure.

[0020] FIG. 7 shows examples of neighboring coefficients of a transform coefficient.

[0021] FIG. 8 illustrates a flowchart of an encoding method for video data according to another embodiment of the present disclosure.

[0022] FIG. 9 is a schematic diagram of a video coding apparatus according to an embodiment of the present disclosure.DETAILED DESCRIPTION

[0023] The disclosure will now be described in detail with reference to the accompanying drawings and examples. Apparently, the described embodiments are only a part of the embodiments of the present disclosure, not all of the embodiments. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.

[0024] In 2020 the Joint Video Experts Team (JVET) of ITU-T and ISO / IEC completed a video compression standard, which is commonly referred to as Versatile Video Coding (VVC) and has the identifiers H. 266 in ITU-T and 23090-3 in ISO / IEC.

[0025] In the context of video compression, color image or a frame of a color video usually consists of three color components, namely a luma component Y and two chroma components Cb and Cr. Each component is represented as a data matrix. The data matrix for each component is decomposed into blocks associated with specific encoding parameters. A block is usually a square or rectangle whose dimensions are integer powers of 2. The coding of an image is processed in raster scanning order: from left to right, then from top to bottom. Within a specific block or a plurality of blocks, luma component is usually coded before chroma components.

[0026] Popular video coding standards such as Versatile Video Coding (VVC) uses a prediction / transform hybrid coding framework. Prediction refers to predicting current block (i.e., the block to be coded) using coded blocks or coded areas within the same frame (i.e., intra prediction) or from a different frame (i.e., inter prediction) . When performing intra or inter prediction, the encoder tries multiple intra prediction modes available to the coding standard, computes and compares corresponding prediction blocks and chooses the best prediction mode. The difference between original current block and the prediction block generated by the chosen prediction mode, namely the residual, will also be coded. By transmitting prediction modes and residuals only, the encoder is able to instruct the decoder to decode and reconstruct the original image or video or its approximation.

[0027] To help understand the technical solutions proposed in the embodiments of this application, a brief introduction of video encoding and decoding system will be provided below.

[0028] As shown in FIG. 1, a video encoding system 110 may include multiple modules, such as block partitioning unit 1101, transform and quantization unit 1102, intra-frame estimation unit 1103, intra-frame prediction unit 1104, motion compensation unit 1105, motion estimation unit 1106, an inverse transformation and inverse quantization unit 1107, a filter control analysis unit 1108, a filtering unit 1109, an encoding unit 1110, an encoded image buffer unit 1111 and a subtractor 1112.

[0029] Original video signals include video frames. Each video frame is divided into blocks by a block partitioning unit 1101. For each of the video frames, the subtractor 1112 generates residual pixel information about a residual frame by subtracting the input video frame from the output of the intra-frame prediction unit 1104 or the motion compensation unit 1105. The residual pixel information obtained after intra-frame prediction or inter-frame prediction (motion compensation) , is transformed by the transformation and quantization unit 1102. The transformation includes transforming the residual pixel information from the pixel domain to a transform domain, and the resulting transform coefficients are quantized to further reduce the bit rate. The intra-frame estimation unit 1103 performs intra-frame estimation, and the intra-frame prediction unit 1104 performs intra-frame prediction on the video reconstructed blocks. Motion estimation performed by the motion estimation unit 1106 is a process of generating a motion vector that can estimate the displacement of the reconstructed video block, and then motion compensation is performed by the motion compensation unit 1105 based on the determined motion vector. After determining an intra-frame prediction mode, the intra-frame prediction unit 1104 provides selected intra-frame predicted data to the encoding unit 1110, and the motion estimation unit 1106 also sends calculated motion vector data to the encoding unit 1110. The inverse transform and inverse quantization unit 1107 reconstructs the video reconstructed blocks and reconstructs a residual block in the pixel domain, and the filtering unit 1109 is controlled by the filter analysis unit 1108 to remove the blocking artifacts in the reconstructed residual block, and the encoding unit 1110 adds the reconstructed residual block to the prediction block of the encoded image buffer unit 1111 to generate a reconstructed block. The encoding unit 1110 is used for encoding various encoding parameters and quantized transform coefficients (quantized transform coefficients) into bitstream, and outputs the bitstream of the video signals. The encoded image buffer unit 1111 is used for storing reconstructed blocks as the reference blocks for intra-frame prediction. As the video image encoding progresses, new reconstructed blocks are continuously generated, and these blocks are stored in the encoded image buffer unit 1111.

[0030] As shown in FIG. 2, a video decoding system 120 may include multiple modules such as a decoding unit 1201, an inverse transform and inverse quantization unit 1202, an intra-frame prediction unit 1203, a motion compensation unit 1204, a filtering unit 1205, a decoded image buffer unit 1206 and a post filtering unit 1207.

[0031] The input signals of video frames are encoded by the video encoding system 110 to obtain an output bitstream. The video encoding system 110 transmits the bitstream to the video decoding system 120. The video decoding system 120 receives the bitstream representing the video frames in an encoded format (i.e., in a compressed format) . In the video decoding system 120, the bitstream is processed by the decoding unit 1201 to obtain decoded transform coefficients. The inverse transform and inverse quantization unit 1202 process the transform coefficients to generate a residual block in the pixel domain. The intra-frame prediction unit 1203 is operable to generate an intra-frame prediction block for a current video decoding block based on a determined intra-frame prediction mode and data from previously decoded blocks of the current video frame or picture. The motion compensation unit 1204 determines the inter-frame prediction information for the current video decoding block and generates an inter-frame prediction block by parsing the motion vector and other associated syntax elements. Finally, the decoded video block is formed by summing the residual block from the inverse transform and inverse quantization unit 1202 and the corresponding prediction block generated by the intra-frame prediction unit 1203 or the motion compensation unit 1204. In order to improve video quality, the decoded video blocks are filtered through the filtering unit 1205 to remove blocking artifacts. The decoded video block is then stored in the decoded image buffer unit 1206 as the reference block for subsequent intra-prediction or motion compensation, and for video output, i.e., to reproduce and reconstruct the original video signals. The output video can be optionally further processed by a post filtering unit 1207 for more suitable or enhanced viewing experiences.

[0032] In video coding, methods to generate a predictor for a block from previously reconstructed samples are generally referred to as a block prediction methods. These previously reconstructed samples are called “reference samples” , and their spatial location within a picture is referred to as “reference area” .

[0033] When reference area and a predicted block belong to different pictures, a block prediction method is called a block inter-prediction method. When reference area and a predicted block belong to the same picture, a block prediction method is called as a block intra-prediction.

[0034] The following sections provide introduction for several related technologies of the present disclosure.

[0035] (1) Reference software

[0036] The VVC standard comes with a reference implementation of encoder and decoder that can be used for research purposes, while not being optimized for usage in any products. This software package is called VVC Test Model (VTM) .

[0037] After the completion of the VVC standard, JVET has during its experimental work developed a new encoder and decoder package referred to as Enhanced Compression Model (ECM) . The most recent version at the time of writing is ECM-16.1 (April 2025) .

[0038] (2) Context-based adaptive binary arithmetic coding

[0039] Both the VVC standard and its predecessor High Efficiency Video Coding (HEVC, H. 265  / ISO / IEC 14496-2) use context-based adaptive binary arithmetic coding (CABAC) as their respective entropy coding engine. The VVC variant, which differs slightly from the version used in HEVC.

[0040] CABAC consists of multiple steps that are repeated for each symbol that is coded:

[0041] a) Each symbol is divided into a number of bins that represent the symbol, and bins are coded by themselves.

[0042] b) For each bin, a context is selected. A context indicates the probability of the bin corresponding to a most probable symbol. Bins can, in different iterations, use different contexts. Different bins can use the same context.

[0043] c) The arithmetic coder is updated with the current bin, according to its probability.

[0044] d) The probability stored in the context is updated based on the coded bin. E. g., if the bin corresponded to the most probable symbol, the probability for the next bin coded with this context corresponding to the most probable symbol is increased.

[0045] A decoder operates in a corresponding manner:

[0046] a) Based on the next bin to be decoded, a context model is chosen.

[0047] b) The status of the coding engine is evaluated to see whether the decoded bin corresponds to the most or least probable symbol.

[0048] c) Based on the decoded value the probability stored in the context is updated.

[0049] As the encoder and decoder need to operate in sync, it is essential that they maintain the exact same probabilities for each context and coded bin at all times.

[0050] The VVC standard defines several hundred different context models for different symbols that can be encoded into a bitstream.

[0051] As an alternative mode, the CABAC engine supports coding bins in the so-called bypass mode. Here no context adaptation is made and bins are directly coded with their value (0 or 1) into the bitstream. This mode is primarily used for bins where there is no good prediction method to determine a least or most probable value. As this mode does not use any context, there is no need to update any contexts after coding a bin, thus this mode has a reduced computational complexity compared to the “normal” CABAC operational mode.

[0052] (3) Golomb-Rice coding

[0053] One aspect that is often the case in video compression standards is that ranges of possible values for symbols are quite limited. Many symbols are represented by flags, i.e., can take either the value 0 or the value 1. For other symbols, the range may be between 0 and 3, which can for example be coded with a fixed-length two-bin code or a variable length truncated unary code. Table 1 shows how these two methods would encode this example. Table 1. Example of fixed-length code and truncated unary

[0054] However, these methods struggle to keep compression efficiency at a high level if the range of values is not as limited. One method of efficiently encoding numbers where the range of possible values is large is Golomb-Rice coding. Here the number to be encoded is divided into a prefix and a suffix, which are coded separately. The prefix is coded as a truncated unary whereas the suffix is coded as a fixed-length code. This method gives a good trade-off between not spending too many bins on small numbers while also allowing to encode large numbers with a reasonable amount of bins. There are variations of this method, but a common way of dividing numbers into prefix and suffix is shown in Table 2. Table 2. Example of Golomb-Rice coding

[0055] (4) Transforms in VVC and ECM

[0056] The VVC standard and the exploration model ECM utilize two types of transforms, generally referred to as separable and non-separable transforms. Separable transforms are orthogonal, i.e., can be applied in horizontal and vertical direction independently. Examples are the families of discrete sine and cosine transforms, DST and DCT. Thus, it is possible to apply one transform in horizontal direction and another one in vertical direction. The advantage of different transforms of the DCT / DST families is that they can reduce the energy of residual in a block in different ways, thus making some transforms better for some blocks and others better for others.

[0057] On the other hand, non-separable transforms cannot be separated into horizontal and vertical directions, thus introducing a larger computational complexity. The VVC standard applies a non-separable transform only as a secondary transform, i.e., after processing a block with a first (or primary) transform.

[0058] VVC allows three types of separable transforms, DCT-2, DST-7 and DCT-8. If a block uses DCT-2 as primary transform, a low frequency non-separable transform (LFNST) may be applied.

[0059] In ECM, the number of available transforms has been expanded. In addition to the transforms from VVC, also DCT-5, DST-4, DST-1 and the identity transform (IDT) are available as primary transforms. Furthermore, some combinations of DCT-2 and LFNST have been replaced by a non-separable primary transform (NSPT) .

[0060] As an alternative, blocks can be coded without applying any transform, the so-called transform skip mode. This is useful for example in cases of screen content, as there often are sharp edges that need to be kept.

[0061] (5) Residual Sign Prediction

[0062] The basic idea of the coefficient sign prediction method (JVET-D0031 and JVET-J0021) is to calculate reconstructed residual for both negative and positive sign combinations for applicable transform coefficients and select the hypothesis that minimizes a cost function.

[0063] To derive the best sign, the cost function is defined as discontinuity measure across block boundary shown in FIG. 3. It is measured for all hypotheses, and the one with the smallest cost is selected as a predictor for coefficient signs.

[0064] The cost function is defined as a sum of absolute second derivatives in the residual domain for the above row and left column as follows:

[0065] In the formula, R is reconstructed neighbors, P is prediction of the current block, and r is the residual hypothesis. The term (-R-1+2R0-P1) can be calculated once per block and only the residual hypothesis is subtracted. The term is pre-calculated and stored with 8-bit accuracy regardless of the sample bit depth.

[0066] The transform coefficients with the largest K qIdx value of the top-left 4x4 area are selected. qIdx value is the transform coefficient level after compensating the impact from the multiple quantizers in the dependent quantization (DQ) tool. A larger qIdx value will produce a larger de-quantized transform coefficient level. qIdx is derived as follows: qIdx = (abs (level) << 1) - (state &1) where level is the transform coefficient level parsed from the bitstream and state is a variable maintained  by the encoder and decoder in DQ.

[0067] A maximum of eight coefficient signs are predicted. If a block uses a non-separable transform (either as primary or secondary transform) , only up to four signs are predicted. There is an additional encoder control mechanism that allows to reduce the number of predicted signs for certain quantization parameters, i.e., quality levels.

[0068] The current context modelling allows to select from a total of eight contexts for encoding a sign prediction. Table 3 shows an overview of when which context is used. Table 3. Current context selection in ECM

[0069] (6) Sign Data Hiding

[0070] Sign data hiding (SDH) is a compression tool that targets compression efficiency by not encoding a sign for the last coefficient of a coefficient group, but instead inferring the sign from the parity of the summed up absolute levels of all coefficients in the coefficient group.

[0071] As existing standards such as HEVC or VVC do not employ any methods to predict coefficient signs and the probability of a coefficient having a positive sign is approximately equal to it having a negative sign, the coefficient signs are bypass coded. SDH reduces the number of signs encoded into the bitstream by omitting the sign for the last coded coefficient in a coefficient group.

[0072] The decoder will add all absolute coefficient levels and based on the parity of the sum, i.e., the least significant bit, infer the sign. If the LSB is set, the sign of the last coefficient is set to negative, otherwise positive.

[0073] On the encoder-side, in approximately half the cases no additional processing is required, as the parity matches the sign. In the other half of cases, the encoder tests to increase or decrease all coefficients in the coefficient group to determine which coefficient level can be changed so that the parity matches while keeping the additional distortion at a minimum. One coefficient is changed and the parity matches the absolute sum.

[0074] Generally speaking, upon making a prediction, such as intra-prediction or inter-prediction of a block, a video encoder may compute the residual data for that block. The residual data, like a residual block, signifies the differences between the block and a prediction block for the block, calculated using the corresponding prediction mode. The video encoder might apply one or multiple transformations to the residual block, resulting in transformed data in a transform domain rather than the sample domain. For instance, the video encoder might apply a discrete cosine transform (DCT) , an integer transform, a wavelet transform, or a similar transform to residual video data.

[0075] Moreover, the video encoder might apply a secondary transform after the first one, such as a mode-dependent non-separable secondary transform (MDNSST) , a signal-dependent transform, a Karhunen-Loeve transform (KLT) , or the like. The video encoder generates transform coefficients following the application of one or more transformations.

[0076] Following any transformations to produce transform coefficients, the video encoder might conduct quantization of the transform coefficients. Quantization generally denotes a process where transform coefficients are quantized to potentially minimize the data amount used to represent the transform coefficients, providing further compression. By carrying out the quantization process, the video encoder might decrease the bit depth associated with some or all of the transform coefficients.

[0077] For example, the video encoder might round down an n-bit value to an m-bit value during quantization, where n is more than m. To conduct quantization, the video encoder might perform a bitwise right-shift of the value to be quantized.

[0078] Following quantization, the video encoder may scan the transform coefficients, producing a one-dimensional vector from the two-dimensional matrix containing the quantized transform coefficients. The scan might be designed to place higher energy (and therefore lower frequency) transform coefficients at the front of the vector and to place lower energy (and therefore higher frequency) transform coefficients at the back of the vector.

[0079] In some instances, the video encoder might utilize a predefined scan order to scan the quantized transform coefficients to produce a serialized vector, and then entropy encodes the quantized transform coefficients of the vector. In other instances, the video encoder might perform an adaptive scan. After scanning the quantized transform coefficients to form the one-dimensional vector, the video encoder may entropy encode the one-dimensional vector, for instance, according to context-adaptive binary arithmetic coding (CABAC) . The video encoder may also entropy encode values for syntax elements describing metadata associated with the encoded video data for use by a video decoder in decoding the video data.

[0080] To perform CABAC, the video encoder might assign a context within a context model to a symbol to be transmitted. The context might relate to, for instance, whether neighboring values of the symbol are zero-valued or not. The probability determination might be based on a context assigned to the symbol.

[0081] The video encoder might further generate syntax data, such as block-based syntax data, picture-based syntax data, and sequence-based syntax data, to a video decoder, for instance, in a picture header, a block header, a slice header, or other syntax data, such as a sequence parameter set (SPS) , picture parameter set (PPS) , or video parameter set (VPS) . The video decoder might likewise decode such syntax data to determine how to decode corresponding video data.

[0082] In this way, the video encoder might generate a bitstream including encoded video data, for instance, syntax elements describing partitioning of a picture into blocks (for example, CUs) and prediction and / or residual information for the blocks. Then, the video decoder might receive the bitstream and decode the encoded video data.

[0083] The video decoder may carry out a reciprocal process to that performed by the video encoder to decode the encoded video data of the bitstream. For example, the video decoder might decode values for syntax elements of the bitstream using CABAC in a manner substantially similar to, albeit reciprocal to, the CABAC encoding process of the video encoder. The syntax elements might define partitioning information for partitioning of a picture into CTUs, and partitioning of each CTU according to a corresponding partition structure, such as a QTBT structure, to define CUs of the CTU. The syntax elements might further define prediction and residual information for blocks (for example, CUs) of video data.

[0084] The residual information might be represented by, for instance, quantized transform coefficients. The video decoder might inverse quantize and inverse transform the quantized transform coefficients of a block to reproduce a residual block for the block. The video decoder uses a signaled prediction mode (intra-or inter-prediction) and related prediction information (for instance, motion information for inter-prediction) to form a prediction block for the block. The video decoder might then combine the prediction block and the residual block (on a sample-by-sample basis) to reproduce the original block. The video decoder might perform additional processing, such as performing a deblocking process to reduce visual artifacts along boundaries of the block.

[0085] As described in foregoing sections of the present disclosure, the video encoder might be configured to perform sign prediction for a certain number of transform coefficients. For example, if two signs are predicted, then there can be 4 possible combinations, or sign prediction hypotheses: (+, +) , (+, -) , (-, +) , (-, -) . For all four combinations, a cost function may be calculated and the combination (for instance, the sign prediction hypothesis) with the minimum cost is selected as a sign predictor combination. The video decoder might perform a reciprocal process.

[0086] For the transform coefficients to which sign prediction can be applied, instead of bypass coding (for instance, fixed probability coding) a syntax element indicating the sign itself, the video encoder might be configured to encode and signal a context coded bin (for instance, syntax element) to indicate whether or not a sign of a transform coefficient is equal to the sign prediction hypothesis. Likewise, the video decoder might be configured to receive and decode the context coded bin (for instance, syntax element) to determine whether the sign of the currently decoded transform coefficient is equal to the sign prediction hypothesis or not. In existing techniques, the contexts (for instance, probability models) used by the video encoder and the video decoder are dependent on the transform coefficient magnitude. That is, the video encoder and the video decoder determine the magnitude of transform coefficients, and then use that magnitude to determine what contexts to use.

[0087] The applicant of the present disclosure found that, the existing context selection methodology is not the most effective for ECM, implying that it may not be suitable for any upcoming standards that might incorporate this tool. In addition, the current method of grouping sign prediction flags based on the coefficient level is not advantageous. There are other factors for context selection that can enable the grouping of signs with similar probabilities together.

[0088] Accordingly, the present disclosure provides a mechanism for selecting a context (e.g., CABAC context) for the flag indicating that a predicted sign is the correct sign for a transform coefficient based on the selected transform for current block. FIG. 4 illustrates a flowchart of a decoding method for video data according to an embodiment of the present disclosure. As shown in FIG. 4, the method includes operations described in blocks S201 to S202.

[0089] In S201, a context for decoding a sign prediction syntax element for a transform coefficient is determined based on a type of transform utilized to generate the transform coefficient.

[0090] As described in foregoing sections of the present disclosure, after predicting a block, the difference (for example, denoted as residual block) between the original block and the predicted block can be acquired. The residual block is converted from the sample domain (spatial domain) to the transform domain (frequency domain) using a transform. A transform coefficient refers to the numerical value representing spatial frequency information in the transform block.

[0091] In this method, the sign prediction syntax element is configured to indicate whether a sign prediction hypothesis is correct for the transform coefficient. For example, the sign prediction syntax element may be a binary flag (0 or 1) indicating whether a predicted sign matches the actual sign of a transform coefficient. The encoder predicts the sign (positive / negative) of a transform coefficient using a hypothesis (e.g., minimizing a cost function) . The syntax element signals whether the prediction is correct or incorrect. Then the decoder may uses this “flag” to reconstruct the sign. For example, if the predicted sign is positive while the actual sign is positive, the syntax element may be equal to 0; if the predicted sign is positive while the actual sign is negative, the syntax element may be equal to 1.

[0092] Context refers to a probability model used to encode / decode a syntax element. Different contexts allow the encoder / decoder to adaptively predict the likelihood of certain values based on surrounding information (e.g., neighboring data, coding modes) . The context determines which probability model is used to encode / decode the sign prediction syntax element.

[0093] The type of transform utilized to generate the transform coefficient may be selected from a pre-defined set or sets of candidate transform. For example, the type utilized to generate the transform coefficient may include at least one selected from: first primary transform; second primary transform; or non-separable transform. As an example, the first primary transform may be selected from: a discrete cosine transform type 2 (DCT-2) , a discrete cosine transform type 7 (DCT-7) , a discrete cosine transform type 8 (DCT-8) , a discrete cosine transform type 5 (DCT-5) , a discrete cosine transform type 4 (DCT-4) , a discrete cosine transform type 1 (DCT-1) , or an identity transform (IDT) . The second primary transform may be a kind of primary transform different from the first primary transform, e.g., other than the above mentioned transform types. Both the first primary transform and the second primary transform can be separable transform.

[0094] In some embodiments, the context for decoding the sign prediction syntax element for the transform coefficient may be determined based on the type of transform utilized to generate the transform coefficient, a prediction mode of the current block, and a type of component corresponding to the transform coefficient.

[0095] As an example, the context for decoding the sign prediction syntax element for the transform coefficient, corresponding to one type of component and one prediction mode of the current block, may be selected from three different contexts based on whether the type of transform is non-separable transform, first primary transform, or second primary transform. It should be noticed, this example is illustrative and does not limit the scope of the present disclosure. For instance, if a coding frameworks defines more than three groups of transform types, the context selection process may correspondingly utilize more than three different contexts.

[0096] In this embodiment, three contexts per component and prediction method are applied, and three aspects are used to determine which context to apply for coding the signs of the coefficients of the current block: 1) different contexts are used for luma and chroma components; 2) different contexts are used for intra and inter prediction; and 3) different contexts are used depending on the transform (s) applied to the current block. If the current block uses a non-separable transform such as LFNST, a first context is used. If a first primary transform is applied, a second context is used. If any other primary transform is applied, a third context is used. As there is no dependency on the coefficient itself, all signs coded in the current block can use the same context. It should be understood that the terms "first context" , "second context" , and "third context" do not denote specific contexts, but rather are used to differentiate the contexts used in various scenarios.

[0097] An example where this embodiment is applied to all components and prediction methods is shown in Table 4. Table 4. Exemplary context selection criteria

[0098] In cases where external restrictions are applied by a standard, for example if a certain component does not allow for a certain transform or set of transforms, the number of contexts used can be reduced. For example, if a standard does not allow a non-separable transform for chroma components, the described solution would only use two contexts for chroma components, one for cases where a first primary transform is used, and one otherwise.

[0099] Experimental results show: applying the above context selection method only for blocks that are part of the luma component and are intra predicted, the compression efficiency is increased by up to 0.05%and 0.02%on average; and applying the above context selection method for blocks that are intra predicted gives an improvement to the compression efficiency by up to 0.15%and 0.02%on average.

[0100] In some embodiments, the context for decoding the sign prediction syntax element for the transform coefficient may be determined based on the type of transform utilized to generate the transform coefficient, a prediction mode of the current block, a level of the transform coefficient, and a type of component corresponding to the transform coefficient.

[0101] As an example, the context for decoding the sign prediction syntax element for the transform coefficient, corresponding to one type of component and one prediction mode of the current block, may be selected from four different contexts based on: whether the type of transform is non-separable transform or separable transform; and whether the level of the transform coefficient is equal to one or larger than one.

[0102] In this embodiment, four contexts per component and prediction method are applied, and four aspects are used to determine which context to use for each sign: 1) whether a block belongs to the luma or chroma component; 2) whether a block is intra or inter predicted; 3) whether a non-separable transform has been applied to the block; and 4) the level of the current coefficient. If a non-separable transform is applied to the current block, a first context will be used to code the sign prediction flag if the absolute level of the corresponding coefficient is equal to 1 and a second context will be used if the absolute level is larger than 1. If only separable transforms are applied to the current block, a third context will be used if the absolute level of the coefficient is equal to 1 and a fourth context otherwise. It should be understood that the terms "first context" , "second context" , and "third context" do not denote specific contexts, but rather are used to differentiate the contexts used in various scenarios.

[0103] An example where this embodiment is applied to all components and prediction methods is shown in Table 5. Table 5. Exemplary context selection criteria

[0104] In cases where external restrictions are applied, for example if a certain component does not allow for a certain transform or set of transforms, the number of contexts used can be reduced. For example, if a standard does not allow a non-separable transform for chroma components, the described solution would only use two contexts for chroma components, one for cases where the level of the current coefficient is equal to 1, and one otherwise. Note that is would correspond to the current method in ECM.

[0105] Experimental results show: applying the above context selection method only to blocks that are part of the chroma components and are intra predicted increases the compression efficiency by up to 0.03%and 0.01%on average.

[0106] As another example, the context for decoding the sign prediction syntax element for the transform coefficient, corresponding to one type of component and one prediction mode of the current block, may be selected from four different contexts based on: whether the type of transform is one of non-separable transform and first primary transform, or second primary transform other than the non-separable transform and the first primary transform; and whether the level of the transform coefficient is equal to one or larger than one.

[0107] In this embodiment, four contexts per component and prediction method are applied, and four aspects are used to determine which context to use for each sign: 1) whether a block belongs to the luma or chroma component; 2) whether a block is intra or inter predicted; 3) whether a non-separable transform or first primary transform has been applied to the block; and 4) the level of the current coefficient. If a non-separable or first primary transform is applied to the current block, a first context will be used to code the sign prediction flag if the absolute level of the corresponding coefficient is equal to 1 and a second context will be used if the absolute level is larger than 1. If any other transform than a non-separable transform or the first primary transform is applied to the current block, a third context will be used if the absolute level of the coefficient is equal to 1 and a fourth context otherwise. It should be understood that the terms "first context" , "second context" , "third context" , and "fourth context" do not denote specific contexts, but rather are used to differentiate the contexts used in various scenarios.

[0108] An example where this embodiment is applied to all components and prediction methods is shown in Table 6. Table 6. Exemplary context selection criteria

[0109] In cases where external restrictions are applied, for example if a certain component does not allow for a certain transform or set of transforms, the number of contexts used can be reduced. For example, if a standard only allows a non-separable transform or the first primary transform for chroma components, the described solution would only use two contexts for chroma components, one for cases where the absolute level of the current coefficient is equal to 1, and one otherwise.

[0110] As another example, the context for decoding the sign prediction syntax element for the transform coefficient, corresponding to one type of component and one prediction mode of the current block, may be selected from six different contexts based on: whether the type of transform is non-separable transform, first primary transform, or second primary transform other than the non-separable transform and the first primary transform; and whether the level of the transform coefficient is equal to one or larger than one.

[0111] In this embodiment, a total of six contexts are used for each component and prediction method, and four aspects are used to determine which context to use for each sign: 1) whether a block belongs to the luma or chroma component; 2) whether a block is intra or inter predicted; 3) whether a non-separable transform, a first primary transform or any other transform has been applied to the block; and 4) the level of the current coefficient. If a non-separable transform is applied to the current block, a first context will be used to code the sign prediction flag if the absolute level of the corresponding coefficient is equal to 1 and a second context will be used if the absolute level is larger than 1. If the first primary transform is applied to the current block, a third context is used if the absolute level of the coefficient is equal to 1 and a fourth context if the absolute level is larger than 1. If any other primary transform is applied on the current block, a fifth context is used if the absolute level of the coefficient is equal to 1 and a sixth context if the absolute level is larger than 1. It should be understood that the terms "first context" , "second context" , "third context" , "fourth context" , “fifth context” , and “sixth context” do not denote specific contexts, but rather are used to differentiate the contexts used in various scenarios.

[0112] An example where this solution is applied to all components and prediction methods is shown in Table 7. Table 7. Exemplary context selection criteria

[0113] In cases where external restrictions are applied, for example if a certain component does not allow for a certain transform or set of transforms, the number of contexts used can be reduced. For example, if a standard does not allow a non-separable transform for chroma components, the described solution would only use four contexts for chroma components, two for cases where a first primary transform is used, and two otherwise, with the decision between the respective two contexts being made based on the coefficient level.

[0114] The foregoing context selection criteria may be combined. For example, different strategies may be applied to different color components. Alternatively or additionally, different strategies may be applied to different prediction modes.

[0115] As an example, the context for decoding the sign prediction syntax element for the transform coefficient, corresponding to a first color component and one prediction mode of the current block, may be selected from six different contexts based on: whether the type of transform is non-separable transform, first primary transform, or second primary transform other than the non-separable transform and the first primary transform; and whether the level of the transform coefficient is equal to one or larger than one. Moreover, the context for decoding the sign prediction syntax element for the transform coefficient, corresponding to a second color component and one prediction mode of the current block, may be selected from four different contexts based on: whether the type of transform is non-separable transform or separable transform; and whether the level of the transform coefficient is equal to one or larger than one. For instance, the first color component is a luma component, and the second color component is a chroma component. Alternatively, the first color component is a chroma component, and the second color component is a luma component.

[0116] An example where this solution is applied to all components and prediction methods is shown in Table 8. Table 8 Exemplary context selection criteria

[0117] Experimental results show: applying the above combination method increases the compression efficiency by up to 0.03%and 0.01%on average.

[0118] As another example, the context for decoding the sign prediction syntax element for the transform coefficient, corresponding to one type of component and a first prediction mode, may be selected from three different contexts based on: whether the type of transform is non-separable transform, first primary transform, or second primary transform other than the non-separable transform and the first primary transform. Mover, the context for decoding the sign prediction syntax element for the transform coefficient, corresponding to one type of component and a second prediction mode, may be selected from six different contexts based on: whether the type of transform is non-separable transform, first primary transform, or second primary transform other than the non-separable transform and the first primary transform; and whether the level of the transform coefficient is equal to one or larger than one. For instance, the first prediction mode is an intra prediction mode and the second prediction mode is an inter prediction mode. Alternatively, the first prediction mode is an inter prediction mode and the second prediction mode is an intra prediction mode.

[0119] An example where this solution is applied to all components and prediction methods is shown in Table 9. Table 9 Exemplary context selection criteria

[0120] In S202, the sign prediction syntax element is decoded using the context.

[0121] With the determined context, the decoder may decode the sign prediction syntax element accordingly.

[0122] According to the above method provided in the present disclosure, the decoder may determine the context for the sign prediction syntax element based not only on the color component type, the level of the transform coefficient, or the prediction mode, but also on the type of transform utilized to generate the transform coefficient. Implementation of the method may help increase compression efficiency of a coded video bitstream.

[0123] FIG. 5 illustrates a flowchart of an encoding method for video data according to an embodiment of the present disclosure. As shown in FIG. 5, the method includes operations described in blocks S301 to S302.

[0124] In S301, a context for encoding a sign prediction syntax element for a transform coefficient is determined based on a type of transform utilized to generate the transform coefficient. The sign prediction syntax element is configured to indicate whether a sign prediction hypothesis is correct for the transform coefficient.

[0125] In some embodiments, the context for encoding the sign prediction syntax element for the transform coefficient may be determined based on the type of transform utilized to generate the transform coefficient, a prediction mode of the current block, and a type of component corresponding to the transform coefficient.

[0126] In some embodiments, the context for encoding the sign prediction syntax element for the transform coefficient may be determined based on the type of transform utilized to generate the transform coefficient, a prediction mode of the current block, a level of the transform coefficient, and a type of component corresponding to the transform coefficient.

[0127] In S302, the sign prediction syntax element is encoded using the context.

[0128] According to the above method provided in the present disclosure, the encoder may determine the context for the sign prediction syntax element based not only on the color component type, the level of the transform coefficient, or the prediction mode, but also on the type of transform utilized to generate the transform coefficient. Implementation of the method may help increase compression efficiency of a coded video bitstream.

[0129] In addition, the present disclosure provides a mechanism for selecting a context (e.g., CABAC context) for the flag indicating that a predicted sign is the correct sign for a transform coefficient based on the levels of transform coefficients near the current coefficient. FIG. 6 illustrates a flowchart of a decoding method for video data according to another embodiment of the present disclosure. As shown in FIG. 6, the method includes operations described in blocks S401 to S402.

[0130] In S401, a context for decoding a sign prediction syntax element for a transform coefficient is determined based on neighboring coefficients of the transform coefficient. The sign prediction syntax element is configured to indicate whether a sign prediction hypothesis is correct for the transform coefficient.

[0131] Neighboring coefficients may be one or more coefficients located near the transform coefficient (denoted as a current transform coefficient of which the context for sign prediction syntax element is currently being determined) in the transform block. FIG. 7 shows examples of neighboring coefficients of a transform coefficient. For instance, the neighboring coefficients can be located to the right and bottom of the current transform coefficient; or the neighboring coefficients can include eight coefficients surrounding the current transform coefficient; or the neighboring coefficients can include four coefficients surrounding the current transform coefficient. Other coefficients in the transform block may not be considered during the context selection process of the current transform coefficient. It should be noticed, if the current coefficient is close to the border of a block and a coefficient that should be evaluated is not part of the current block, the coefficient can be ignored, and the context of the current transform coefficient may be determined based on fewer coefficients.

[0132] Different from the methods described in FIG. 4 and FIG. 5, in this method, the transform type applied to the current block may not be evaluated. Instead, the levels or other statistical properties of neighboring coefficients of the current transform coefficient are considered for determination of context for the current transform coefficient.

[0133] In some embodiments, the context for decoding the sign prediction syntax element for the transform coefficient may be determined based on a sum of levels of the neighboring coefficients.

[0134] For example, several thresholds may be pre-defined or pre-configured to both the encoder and the decoder. Assuming the thresholds include a first threshold (TH1) , a second threshold (TH2) , and a third threshold (TH3) , the context selection criteria may be:

[0135] 1) a first context is selected as the context for decoding the sign prediction syntax element for the transform coefficient responsive to the sum of levels of the neighboring coefficients being lower than the first threshold;

[0136] 2) a second context is selected as the context for decoding the sign prediction syntax element for the transform coefficient responsive to the sum of levels of the neighboring coefficients being no less than the first threshold and lower than the second threshold;

[0137] 3) a third context is selected as the context for decoding the sign prediction syntax element for the transform coefficient responsive to the sum of levels of the neighboring coefficients being no less than the second threshold and lower than the third threshold;

[0138] 4) a fourth context is selected as the context for decoding the sign prediction syntax element for the transform coefficient responsive to the sum of levels of the neighboring coefficients being no less than the third threshold.

[0139] Table 10 shows a pseudo code of the above example. sum_coeffis refers to the sum of levels of the neighboring coefficients, and context_id refers to the identifier of the determined context. Table 10

[0140] It should be understood that the terms "first context" , "second context" , "third context" , and "fourth context" do not denote specific contexts, but rather are used to differentiate the contexts used in various scenarios.

[0141] As a concrete example, the thresholds could be set to TH1 = 13, TH2 = 29, and TH3 = 73. Experimental results show: applying the above method for blocks that are intra predicted improves the compression efficiency by 0.02%on average and up to 0.05%for certain sequences in the test set.

[0142] Alternatively, other statistical properties of neighboring coefficients of the current transform coefficient may be considered for determination of context for the current transform coefficient.

[0143] In one embodiment, the context for decoding the sign prediction syntax element for the transform coefficient may be determined based on a total number of non-zero coefficients within the neighboring coefficients.

[0144] Specifically, a first context is selected as the context for decoding the sign prediction syntax element for the transform coefficient responsive to the total number of non-zero coefficients within the neighboring coefficients being less than a pre-defined threshold; and a second context is selected as the context for decoding the sign prediction syntax element for the transform coefficient responsive to the total number of non-zero coefficients within the neighboring coefficients being no less than the pre-defined threshold.

[0145] In one embodiment, the context for decoding the sign prediction syntax element for the transform coefficient may be determined based on a number of odd coefficients and a number of even coefficients within the neighboring coefficients.

[0146] Specifically, a first context is selected as the context for decoding the sign prediction syntax element for the transform coefficient responsive to the number of odd coefficients being less than the number of even coefficients within the neighboring coefficients; and a second context is selected as the context for decoding the sign prediction syntax element for the transform coefficient responsive to the number of odd coefficients being no less than the number of even coefficients within the neighboring coefficients.

[0147] In one embodiment, the context for decoding the sign prediction syntax element for the transform coefficient may be determined based on a number of coefficients whose levels are larger than a level threshold within the neighboring coefficients.

[0148] Specifically, a first context is selected as the context for decoding the sign prediction syntax element for the transform coefficient responsive to the number of coefficients whose levels are larger than the level threshold within the neighboring coefficients being less than a pre-defined threshold; and a second context is selected as the context for decoding the sign prediction syntax element for the transform coefficient responsive to the number of coefficients whose levels are larger than the level threshold within the neighboring coefficients being no less than the pre-defined threshold.

[0149] It should be understood that the terms "first context" and "second context" in the foregoing methods do not denote specific contexts, but rather are used to differentiate the contexts used in various scenarios.

[0150] In addition, the above-mentioned statistical properties of the neighboring coefficients may be combined for context determination. In other words, certain patterns in nearby coefficients may be evaluated. The context to be used for sign prediction syntax element of the current transform coefficient can be determined based on a set of conditions. Table 11 shows a pseudo code of an example of what kind of patterns can be used, with TH4 and TH5 being thresholds that are used to trigger these conditions. num_nonzero_coeffs refers to the number of non-zero coefficients among the neighboring coefficients. num_odd_coeffs refers to the number of odd coefficients among the neighboring coefficients. num_even_coeffs refers to the number of even coefficients among the neighboring coefficients. num_coeffs_larger_then_10 refers to the number of coefficients whose levels are larger than 10 among the neighboring coefficients. context_id refers to the identifier of the determined context. Table 11

[0151] Note that this embodiment does not describe a fixed number of contexts used, but rather lists options. For example, in an implementation variant only two contexts are used and the decision is made based on whether the number of odd coefficients is lower than the number of even coefficients.

[0152] In S402, the sign prediction syntax element is decoded using the context.

[0153] With the determined context, the decoder may decode the sign prediction syntax element accordingly.

[0154] According to the above method provided in the present disclosure, the decoder may determine the context for the sign prediction syntax element based on neighboring coefficients of the current transform coefficient. Implementation of the method may help increase compression efficiency of a coded video bitstream.

[0155] FIG. 8 illustrates a flowchart of an encoding method for video data according to another embodiment of the present disclosure. As shown in FIG. 8, the method includes operations described in blocks S501 to S502.

[0156] In S501, a context for encoding a sign prediction syntax element for a transform coefficient is determined based on neighboring coefficients of the transform coefficient. The sign prediction syntax element is configured to indicate whether a sign prediction hypothesis is correct for the transform coefficient.

[0157] In some embodiments, the context for encoding the sign prediction syntax element for the transform coefficient may be determined based on a sum of levels of the neighboring coefficients.

[0158] In some embodiments, the context for encoding the sign prediction syntax element for the transform coefficient may be determined based on a total number of non-zero coefficients within the neighboring coefficients.

[0159] In some embodiments, the context for encoding the sign prediction syntax element for the transform coefficient may be determined based on a number of odd coefficients and a number of even coefficients within the neighboring coefficients.

[0160] In some embodiments, the context for encoding the sign prediction syntax element for the transform coefficient may be determined based on a number of coefficients whose levels are larger than a pre-defined level threshold within the neighboring coefficients.

[0161] In S502, the sign prediction syntax element is encoded using the context.

[0162] According to the above method provided in the present disclosure, the encoder may determine the context for the sign prediction syntax element based on neighboring coefficients of the current transform coefficient. Implementation of the method may help increase compression efficiency of a coded video bitstream.

[0163] FIG. 9 conceptually illustrates a video coding apparatus 600 with which some embodiments of the invention are implemented. The video coding apparatus 600 may be a decoding device or an encoding device. The apparatus 600 may be a computer (e.g., a desktop computer, personal computer, tablet computer, etc. ) , phone, PDA, or any other sort of electronic device. Such an apparatus includes various types of computer readable media and interfaces for various other types of computer readable media. The apparatus 600 includes a processor 602 and a memory 604. The memory 604 is configured to store executable instructions that, when executed by the processor, cause the processor to perform any one of the foregoing decoding or encoding methods.

[0164] The processor 602 may be a single processor or a multi-core processor in different embodiments. In some embodiments, the processor may include a GPU, NPU or DSP which may offload various computations or complement the image processing provided by the processor 602.

[0165] Some embodiments include electronic components, such as microprocessors, storage and memory that store computer program instructions in a machine-readable or computer-readable medium (alternatively referred to as computer-readable storage media, machine-readable media, or machine-readable storage media) . Some examples of such computer-readable media include RAM, ROM, read-only compact discs (CD-ROM) , recordable compact discs (CD-R) , rewritable compact discs (CD-RW) , read-only digital versatile discs (e.g., DVD-ROM, dual-layer DVD-ROM) , a variety of recordable / rewritable DVDs (e.g., DVD-RAM, DVD-RW, DVD+RW, etc. ) , flash memory (e.g., SD cards, mini-SD cards, micro-SD cards, etc. ) , magnetic and / or solid state hard drives, read-only and recordable discs, ultra density optical discs, any other optical or magnetic media, and floppy disks. The computer-readable media may store a computer program that is executable by at least one processing unit and includes sets of instructions for performing various operations. Examples of computer programs or computer code include machine code, such as is produced by a compiler, and files including higher-level code that are executed by a computer, an electronic component, or a microprocessor using an interpreter.

[0166] While the above discussion primarily refers to microprocessor or multi-core processors that execute software, some embodiments are performed by one or more integrated circuits, such as application specific integrated circuits (ASICs) or field programmable gate arrays (FPGAs) . In some embodiments, such integrated circuits execute instructions that are stored on the circuit itself. In addition, some embodiments execute software stored in programmable logic devices (PLDs) , ROM, or RAM devices.

[0167] As used in this specification and any claims of this application, the terms “computer” , “server” , “processor” , and “memory” all refer to electronic or other technological devices. These terms exclude people or groups of people. As used in this specification and any claims of this application, the terms “computer readable medium, ” “computer readable media, ” and “machine readable medium” are entirely restricted to tangible, physical objects that store information in a form that is readable by a computer. These terms exclude any wireless signals, wired download signals, and any other ephemeral signals.

[0168] The present disclosure further provides a computer readable media which is configured to store executable instructions. When the instructions are executed by a processor, the processor may perform any one of the foregoing methods and processes. Many of the above-described features and applications are implemented as software processes that are specified as a set of instructions recorded on a computer readable storage medium (also referred to as computer readable medium) . When these instructions are executed by one or more computational or processing unit (s) (e.g., one or more processors, cores of processors, or other processing units) , they cause the processing unit (s) to perform the actions indicated in the instructions. Examples of computer readable media include, but are not limited to, CD-ROMs, flash drives, random access memory (RAM) chips, hard drives, erasable programmable read only memories (EPROMs) , electrically erasable programmable read-only memories (EEPROMs) , etc. The computer readable media does not include carrier waves and electronic signals passing wirelessly or over wired connections.

[0169] In this specification, the term “software” is meant to include firmware residing in read-only memory or applications stored in magnetic storage which can be read into memory for processing by a processor. Also, in some embodiments, multiple software inventions can be implemented as sub-parts of a larger program while remaining distinct software inventions. In some embodiments, multiple software inventions can also be implemented as separate programs. Finally, any combination of separate programs that together implement a software invention described here is within the scope of the invention. In some embodiments, the software programs, when installed to operate on one or more electronic systems, define one or more specific machine implementations that execute and perform the operations of the software programs.

[0170] While the disclosure has been described with reference to numerous specific details, one of ordinary skill in the art will recognize that the invention can be embodied in other specific forms without departing from the spirit of the invention. In addition, a number of the figures conceptually illustrate processes and methods. The specific operations of these processes may not be performed in the exact order shown and described. The specific operations may not be performed in one continuous series of operations, and different specific operations may be performed in different embodiments. Furthermore, the process could be implemented using several sub-processes, or as part of a larger macro process.

[0171] The foregoing is merely embodiments of the present disclosure, and is not intended to limit the scope of the disclosure. Any transformation of equivalent structure or equivalent process which uses the specification and the accompanying drawings of the present disclosure, or directly or indirectly application in other related technical fields, are likewise included within the scope of the protection of the present disclosure.

Claims

A decoding method for video data, comprising:determining a context for decoding a sign prediction syntax element for a transform coefficient based on a type of transform utilized to generate the transform coefficient, wherein the sign prediction syntax element is configured to indicate whether a sign prediction hypothesis is correct for the transform coefficient; anddecoding the sign prediction syntax element using the context.The method of claim 1, wherein the type of transform utilized generate the transform coefficient comprises at least one selected from:first primary transform;second primary transform; ornon-separable transform.The method of claim 2,wherein the first primary transform comprises at least one selected from: a discrete cosine transform type 2 (DCT-2) , a discrete cosine transform type 7 (DCT-7) , a discrete cosine transform type 8 (DCT-8) , a discrete cosine transform type 5 (DCT-5) , a discrete cosine transform type 4 (DCT-4) , a discrete cosine transform type 1 (DCT-1) , or an identity transform (IDT) ;wherein the second primary transform is different from the first primary transform.The method of claim 1,wherein the context for decoding the sign prediction syntax element for the transform coefficient is determined based on the type of transform utilized to generate the transform coefficient, a prediction mode of the current block, and a type of component corresponding to the transform coefficient.The method of claim 4, wherein the context for decoding the sign prediction syntax element for the transform coefficient, corresponding to one type of component and one prediction mode of the current block, is selected from three different contexts based on whether the type of transform is non-separable transform, first primary transform, or second primary transform.The method of claim 1,wherein the context for decoding the sign prediction syntax element for the transform coefficient is determined based on the type of transform utilized to generate the transform coefficient, a prediction mode of the current block, a level of the transform coefficient, and a type of component corresponding to the transform coefficient.The method of claim 6,wherein the context for decoding the sign prediction syntax element for the transform coefficient, corresponding to one type of component and one prediction mode of the current block, is selected from four different contexts based on:whether the type of transform is non-separable transform or separable transform; andwhether the level of the transform coefficient is equal to one or larger than one.The method of claim 6,wherein the context for decoding the sign prediction syntax element for the transform coefficient, corresponding to one type of component and one prediction mode of the current block, is selected from four different contexts based on:whether the type of transform is one of non-separable transform and first primary transform, or second primary transform other than the non-separable transform and the first primary transform; andwhether the level of the transform coefficient is equal to one or larger than one.The method of claim 6,wherein the context for decoding the sign prediction syntax element for the transform coefficient, corresponding to one type of component and one prediction mode of the current block, is selected from six different contexts based on:whether the type of transform is non-separable transform, first primary transform, or second primary transform other than the non-separable transform and the first primary transform; andwhether the level of the transform coefficient is equal to one or larger than one.The method of claim 6,wherein the context for decoding the sign prediction syntax element for the transform coefficient, corresponding to a first color component and one prediction mode of the current block, is selected from six different contexts based on:whether the type of transform is non-separable transform, first primary transform, or second primary transform other than the non-separable transform and the first primary transform; andwhether the level of the transform coefficient is equal to one or larger than one;wherein the context for decoding the sign prediction syntax element for the transform coefficient, corresponding to a second color component and one prediction mode of the current block, is selected from four different contexts based on:whether the type of transform is non-separable transform or separable transform; andwhether the level of the transform coefficient is equal to one or larger than one.The method of claim 10,wherein the first color component is a luma component, and the second color component is a chroma component; orwherein the first color component is a chroma component, and the second color component is a luma component.The method of claim 6,wherein the context for decoding the sign prediction syntax element for the transform coefficient, corresponding to one type of component and a first prediction mode, is selected from three different contexts based on:whether the type of transform is non-separable transform, first primary transform, or second primary transform other than the non-separable transform and the first primary transform;wherein the context for decoding the sign prediction syntax element for the transform coefficient, corresponding to one type of component and a second prediction mode, is selected from six different contexts based on:whether the type of transform is non-separable transform, first primary transform, or second primary transform other than the non-separable transform and the first primary transform; andwhether the level of the transform coefficient is equal to one or larger than one.The method of claim 12,wherein the first prediction mode is an intra prediction mode and the second prediction mode is an inter prediction mode; orwherein the first prediction mode is an inter prediction mode and the second prediction mode is an intra prediction mode.An encoding method for video data, comprising:determining a context for encoding a sign prediction syntax element for a transform coefficient based on a type of transform utilized to generate the transform coefficient, wherein the sign prediction syntax element is configured to indicate whether a sign prediction hypothesis is correct for the transform coefficient; andencoding the sign prediction syntax element using the context.The method of claim 14,wherein the context for encoding the sign prediction syntax element for the transform coefficient is determined based on the type of transform utilized to generate the transform coefficient, a prediction mode of the current block, and a type of component corresponding to the transform coefficient.The method of claim 14,wherein the context for encoding the sign prediction syntax element for the transform coefficient is determined based on the type of transform utilized to generate the transform coefficient, a prediction mode of the current block, a level of the transform coefficient, and a type of component corresponding to the transform coefficient.A decoding method for video data, comprising:determining a context for decoding a sign prediction syntax element for a transform coefficient based on neighboring coefficients of the transform coefficient, wherein the sign prediction syntax element is configured to indicate whether a sign prediction hypothesis is correct for the transform coefficient; anddecoding the sign prediction syntax element using the context.The method of claim 17,wherein the context for decoding the sign prediction syntax element for the transform coefficient is determined based on a sum of levels of the neighboring coefficients.The method of claim 18, whereina first context is selected as the context for decoding the sign prediction syntax element for the transform coefficient responsive to the sum of levels of the neighboring coefficients being lower than a first threshold;a second context is selected as the context for decoding the sign prediction syntax element for the transform coefficient responsive to the sum of levels of the neighboring coefficients being no less than the first threshold and lower than a second threshold;a third context is selected as the context for decoding the sign prediction syntax element for the transform coefficient responsive to the sum of levels of the neighboring coefficients being no less than the second threshold and lower than a third threshold;a fourth context is selected as the context for decoding the sign prediction syntax element for the transform coefficient responsive to the sum of levels of the neighboring coefficients being no less than the third threshold.The method of claim 17,wherein the context for decoding the sign prediction syntax element for the transform coefficient is determined based on a total number of non-zero coefficients within the neighboring coefficients.The method of claim 20,wherein a first context is selected as the context for decoding the sign prediction syntax element for the transform coefficient responsive to the total number of non-zero coefficients within the neighboring coefficients being less than a pre-defined threshold; andwherein a second context is selected as the context for decoding the sign prediction syntax element for the transform coefficient responsive to the total number of non-zero coefficients within the neighboring coefficients being no less than the pre-defined threshold.The method of claim 17,wherein the context for decoding the sign prediction syntax element for the transform coefficient is determined based on a number of odd coefficients and a number of even coefficients within the neighboring coefficients.The method of claim 22,wherein a first context is selected as the context for decoding the sign prediction syntax element for the transform coefficient responsive to the number of odd coefficients being less than the number of even coefficients within the neighboring coefficients; andwherein a second context is selected as the context for decoding the sign prediction syntax element for the transform coefficient responsive to the number of odd coefficients being no less than the number of even coefficients within the neighboring coefficients.The method of claim 17,wherein the context for decoding the sign prediction syntax element for the transform coefficient is determined based on a number of coefficients whose levels are larger than a level threshold within the neighboring coefficients.The method of claim 24,wherein a first context is selected as the context for decoding the sign prediction syntax element for the transform coefficient responsive to the number of coefficients whose levels are larger than the level threshold within the neighboring coefficients being less than a pre-defined threshold; andwherein a second context is selected as the context for decoding the sign prediction syntax element for the transform coefficient responsive to the number of coefficients whose levels are larger than the level threshold within the neighboring coefficients being no less than the pre-defined threshold.An encoding method for video data, comprising:determining a context for encoding a sign prediction syntax element for a transform coefficient based on neighboring coefficients of the transform coefficient, wherein the sign prediction syntax element is configured to indicate whether a sign prediction hypothesis is correct for the transform coefficient; andencoding the sign prediction syntax element using the context.The method of claim 26,wherein the context for encoding the sign prediction syntax element for the transform coefficient is determined based on a sum of levels of the neighboring coefficients.The method of claim 26,wherein the context for encoding the sign prediction syntax element for the transform coefficient is determined based on a total number of non-zero coefficients within the neighboring coefficients.The method of claim 26,wherein the context for encoding the sign prediction syntax element for the transform coefficient is determined based on a number of odd coefficients and a number of even coefficients within the neighboring coefficients.The method of claim 26,wherein the context for encoding the sign prediction syntax element for the transform coefficient is determined based on a number of coefficients whose levels are larger than a pre-defined level threshold within the neighboring coefficients.A video coding apparatus, comprising a processor and a memory, wherein the memory is configured to store executable instructions that, when executed by the processor, cause the processor to perform the method of any of claims 1 to 30.A non-transitory computer readable medium storing executable instructions that, when executed by a processor, cause the processor to perform the method of any of claims 1 to 30.