Method and apparatus for predicting signs of transform coefficients in image or video coding system

The method of predicting transform coefficient signs using normalized template functions addresses inefficiencies in video coding systems, enhancing compression efficiency and reducing complexity, thereby improving video quality.

WO2025195491A1PCT designated stage Publication Date: 2025-09-25MEDIATEK INC
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2025/083967
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2024-03-22
Filing Date
2025-03-21
Publication Date
2025-09-25

AI Technical Summary

Technical Problem

Existing video coding systems face inefficiencies in the processing and encoding of signs of transform coefficients for residual blocks, particularly in the context of versatile video coding (VVC), which affects compression efficiency and computational complexity.

Method used

A method and apparatus for predicting the signs of transform coefficients in video coding systems, utilizing normalized template functions to approximate inverse transformation matrices along block boundaries, allowing for efficient derivation of residual hypotheses with reduced computational complexity and improved compression performance.

Benefits of technology

Enhances the compression efficiency and reduces computational complexity in video coding by optimizing the prediction of transform coefficient signs, leading to improved video quality and reduced processing overhead.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2025083967_25092025_PF_FP_ABST
    Figure CN2025083967_25092025_PF_FP_ABST
Patent Text Reader

Abstract

A method of initial residual hypothesis derivation for joint sign prediction of transform coefficients of a residue block. According to this method, an initial residual hypothesis is derived by applying inverse transformation to de-quantized transform coefficients with the set of sign-predicted transform coefficients set to zero or by applying the inverse transformation to the de-quantized transform coefficients corresponding to non-sign-predicted transform coefficients only to form a first part of the initial residual hypothesis, and adding a second part by summing up products of normalized template functions and absolute values of respective sign-predicted transform coefficients for the set of sign-predicted transform coefficients. The normalized template functions represent approximated entry values of inverse transformation matrixes along top and left block boundaries for corresponding transform coefficient indexes associated with the respective sign-predicted transform coefficients. The initial residual hypothesis is used to derive sign prediction for the sign-predicted transform coefficients.
Need to check novelty before this filing date? Find Prior Art

Description

METHOD AND APPARATUS FOR PREDICTING SIGNS OF TRANSFORM COEFFICIENTS IN IMAGE OR VIDEO CODING SYSTEMCROSS REFERENCE TO RELATED APPLICATIONS

[0001] The present invention is a non-Provisional Application of and claims priority to U.S. Provisional Patent Application No. 63 / 568,507, filed on March 22, 2024. The U.S. Provisional Patent Application is hereby incorporated by reference in its entirety.FIELD OF THE INVENTION

[0002] The present invention relates to video coding system. In particular, the present invention relates to coding of signs of transform coefficients for residual blocks in a video coding system.BACKGROUND

[0003] Versatile video coding (VVC) is the latest international video coding standard developed by the Joint Video Experts Team (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 -Coded representation of immersive media -Part 3: Versatile video coding, published Feb. 2021. VVC is developed based on its predecessor HEVC (High Efficiency Video Coding) by adding more coding tools to improve coding efficiency and also to handle various types of video sources including 3-dimensional (3D) video signals.

[0004] Fig. 1A illustrates an exemplary adaptive Inter / Intra video encoding system incorporating loop processing. For Intra Prediction, the prediction data is derived based on previously coded video data in the current picture. For Inter Prediction 112, Motion Estimation (ME) is performed at the encoder side and Motion Compensation (MC) is performed based of the result of ME to provide prediction data derived from other picture (s) and motion data. Switch 114 selects Intra Prediction 110 or Inter-Prediction 112 and the selected prediction data is supplied to Adder 116 to form prediction errors, also called residues. The prediction error is then processed by Transform (T) 118 followed by Quantization (Q) 120. The transformed and quantized residues are then coded by Entropy Encoder 122 to be included in a video bitstream corresponding to the compressed video data. The bitstream associated with the transform coefficients is then packed with side information such as motion and coding modes associated with Intra prediction and Inter prediction, and other information such as parameters associated with loop filters applied to underlying image area. The side information associated with Intra Prediction 110, Inter prediction 112 and deblocking filter (DF) 130 / non-deblocking filters (NDFs) 132, are provided to Entropy Encoder 122 as shown in Fig. 1A. When an Inter-prediction mode is used, a reference picture or pictures have to be reconstructed at the encoder end as well. Consequently, the transformed and quantized residues are processed by Inverse Quantization (IQ) 124 and Inverse Transformation (IT) 126 to recover the residues. The residues are then added back to prediction data 136 at Reconstruction (REC) 128 to reconstruct video data. The reconstructed video data may be stored in Reference Picture Buffer 134 and used for prediction of other frames.

[0005] As shown in Fig. 1A, incoming video data undergoes a series of processing in the encoding system. The reconstructed video data from REC 128 may be subject to various impairments due to a series of processing. Accordingly, deblocking filter (DF) 130 / non-deblocking filters (NDFs) are often applied to the reconstructed video data before the reconstructed video data are stored in the Reference Picture Buffer 134 in order to improve video quality. For example, deblocking filter (DF) , Sample Adaptive Offset (SAO) and Adaptive Loop Filter (ALF) may be used. The loop filter information may need to be incorporated in the bitstream so that a decoder can properly recover the required information. Therefore, loop filter information is also provided to Entropy Encoder 122 for incorporation into the bitstream. In Fig. 1A, deblocking filter (DF) 130 / non-deblocking filters (NDFs) 132 are applied to the reconstructed video before the reconstructed samples are stored in the reference picture buffer 134. The system in Fig. 1A is intended to illustrate an exemplary structure of a typical video encoder. It may correspond to the High Efficiency Video Coding (HEVC) system, VP8, VP9, H.264 or VVC.

[0006] The decoder, as shown in Fig. 1B, can use some of the functional blocks as the encoder. For example, the decoder can reuse Inverse Quantization 124 and Inverse Transform 126; however, Transform 118 and Quantization 120 are not needed at the decoder. Instead of Entropy Encoder 122, the decoder uses an Entropy Decoder 140 to decode the video bitstream into quantized transform coefficients and needed coding information (e.g. ILPF information, Intra prediction information and Inter prediction information) . The Intra prediction 150 at the decoder side does not need to perform the mode search. Instead, the decoder only needs to generate Intra prediction according to Intra prediction information received from the Entropy Decoder 140. Furthermore, for Inter prediction, the decoder only needs to perform motion compensation (MC 152) according to Inter prediction information received from the Entropy Decoder 140 without the need for motion estimation.

[0007] In VVC, a coded picture is partitioned into non-overlapped square block regions represented by the associated coding tree units (CTUs) . A coded picture can be represented by a collection of slices, each comprising an integer number of CTUs. The individual CTUs in a slice are processed in raster-scan order. A bi-predictive (B) slice may be decoded using intra prediction or inter prediction with at most two motion vectors and reference indices to predict the sample values of each block. A predictive (P) slice is decoded using intra prediction or inter prediction with at most one motion vector and reference index to predict the sample values of each block. An intra (I) slice is decoded using intra prediction only.

[0008] A CTU can be partitioned into one or multiple non-overlapped coding units (CUs) using the quatree (QT) with nested multi-type-tree (MTT) structure to adapt to various local motion and texture characteristics. A CU can be further split into smaller CUs using one of the five split types (quad-tree partitioning 210, vertical binary tree partitioning 220, horizontal binary tree partitioning 230, vertical centre-side triple-tree partitioning 240, horizontal centre-side triple-tree partitioning 250) illustrated in Fig. 2. Fig. 3 provides an example of a CTU recursively partitioned by QT with the nested MTT. Each CU contains one or more prediction units (PUs) . The prediction unit, together with the associated CU syntax, works as a basic unit for signalling the predictor information. The specified prediction process is employed to predict the values of the associated pixel samples inside the PU. Each CU may contain one or more transform units (TUs) for representing the prediction residual blocks. A transform unit (TU) comprises of a transform block (TB) of luma samples and two corresponding transform blocks of chroma samples and each TB correspond to one residual block of samples from one colour component. An integer transform is applied to a transform block. The level values of quantized coefficients together with other side information are entropy coded in the bitstream. The terms coding tree block (CTB) , coding block (CB) , prediction block (PB) , and transform block (TB) are defined to specify the 2-D sample array of one colour component associated with CTU, CU, PU, and TU, respectively. Thus, a CTU consists of one luma CTB, two chroma CTBs, and associated syntax elements. A similar relationship is valid for CU, PU, and TU.

[0009] For achieving high compression efficiency, the context-based adaptive binary arithmetic coding (CABAC) mode, or known as regular mode, is employed for entropy coding of the values of the syntax elements in HEVC and VVC. Fig. 4 illustrates an exemplary block diagram of the CABAC process. Since the arithmetic coder in the CABAC engine can only encode the binary symbol values, the CABAC process needs to convert the values of the syntax elements into a binary string using a binarizer (410) . The conversion process is commonly referred to as binarization. During the coding process, the probability models are gradually built up from the coded symbols for the different contexts. The context modeller (420) serves the modelling purpose. During normal context based coding, the regular coding engine (430) is used, which corresponds to a binary arithmetic coder. The selection of the modelling context for coding the next binary symbol can be determined by the coded information. Symbols can also be encoded without the context modelling stage and assume an equal probability distribution, commonly referred to as the bypass mode, for reduced complexity. For the bypassed symbols, a bypass coding engine (440) may be used. As shown in Fig. 4, switches (S1, S2 and S3) are used to direct the data flow between the regular CABAC mode and the bypass mode. When the regular CABAC mode is selected, the switches are flipped to the upper contacts. When the bypass mode is selected, the switches are flipped to the lower contacts as shown in Fig. 4.

[0010] The present invention is intended to further improve the performance of the sign coding for transform coefficients of residual data in a video coding system. BRIEF SUMMARY OF THE INVENTION

[0011] A method and apparatus of sign coding for transform coefficients of residual data in a video coding system are disclosed. According to this method, input data is received, wherein the input data comprises coded transform coefficients corresponding to a residual block of a current block in an encoder side or the input data comprises transform coefficients corresponding to the residual block of the current block. A set of sign-predicted transform coefficients from the transform coefficients corresponding to the residual block of the current block is determined. Block boundary samples for the current block are determined. An initial residual hypothesis is derived by applying inverse transformation to de-quantized transform coefficients with the set of sign-predicted transform coefficients set to zero or by applying the inverse transformation to the de-quantized transform coefficients corresponding to non-sign-predicted transform coefficients only to form a first part of the initial residual hypothesis, and then adding a second part by summing up products of normalized template functions and absolute values of respective sign-predicted transform coefficients for the set of sign-predicted transform coefficients, wherein the normalized template functions represent approximated entry values of inverse transformation matrixes along top and left block boundaries for corresponding transform coefficient indexes associated with the respective sign-predicted transform coefficients. Remaining residual hypotheses associated with combinations of a set of signs for the set of sign-prediction transform coefficients are derived, wherein each combination of the set of signs is assigned with one transform coefficient index, and wherein each of remaining residual hypotheses is derived from a previous residual hypothesis and a target template function corresponding to a target transform coefficient index with a sign flip. Boundary costs for all residual hypotheses are evaluated, wherein each of boundary costs is measured on the block boundary samples. A target combination of the set of signs is determined based on a minimum cost among the boundary costs. The set of signs associated with the set of sign-predicted transform coefficients is encoded or decoded by using predicted signs corresponding to the target combination of the set of signs.

[0012] In one embodiment, the initial residual hypothesis and the remaining residual hypotheses are all reconstructed based on a same set of synthesis functions for the set of sign-predicted transform coefficients.

[0013] In one embodiment, the block boundary samples comprise predicted samples of the current block adjacent to block boundary and reconstructed neighbouring samples of the current block adjacent to the block boundary. In one embodiment, the normalized template functions are pre-calculated and stored for subsequent calculation of the initial residual hypothesis and remaining residual hypotheses.

[0014] According to another method, input data is received, wherein the input data comprises coded transform coefficients corresponding to a residual block of a current block in an encoder side or the input data comprises transform coefficients corresponding to the residual block of the current block. A set of sign-predicted transform coefficients from the transform coefficients corresponding to the residual block of the current block is determined. A specified sign prediction area is determined, wherein normalized template functions along left and top block boundaries are stored for transform coefficient indices within the specified sign prediction area, and wherein each of the normalized template functions represents approximated entry values of an inverse transformation matrix along the top and left block boundaries for one transform coefficient index. An initial residual hypothesis is derived, wherein the initial residual hypothesis comprises a first part and a second part, the first part is generated by summing up products of absolute values of sign-predicted transform coefficients and respective normalized template functions for the set of sign-predicted transform coefficients, and the second part is generated by summing up products of values of non-sign-predicted transform coefficients within the specified sign prediction area and the respective normalized template functions. Remaining residual hypotheses associated with combinations of a set of signs for the set of sign-prediction transform coefficients are deriving. Boundary costs for all residual hypotheses are evaluated, wherein each of boundary costs is measured on block boundary samples. A target combination of the set of signs is determined based on a minimum cost among the boundary costs. The set of signs associated with the set of sign-predicted transform coefficients is encoded or decoded by using predicted signs corresponding to the target combination of the set of signs.

[0015] In one embodiment, if all non-zero transform coefficients of the current block are within the specific sign prediction area, the initial residual hypothesis comprises only the first part and the second part.

[0016] In one embodiment, if one or more non-zero transform coefficients of the current block are not within the specific sign prediction area, values of said one or more non-zero transform coefficients of the current block are set to 0 and the initial residual hypothesis comprises only the first part and the second part.BRIEF DESCRIPTION OF THE DRAWINGS

[0017] Fig. 1A illustrates an exemplary adaptive Inter / Intra video encoding system incorporating loop processing.

[0018] Fig. 1B illustrates a corresponding decoder for the encoder in Fig. 1A.

[0019] Fig. 2 illustrates that a CU can be split into smaller CUs using one of the five split types (quad-tree partitioning, vertical binary tree partitioning, horizontal binary tree partitioning, vertical centre-side triple-tree partitioning, and horizontal centre-side triple-tree partitioning) .

[0020] Fig. 3 illustrates an example of a CTU being recursively partitioned by QT with the nested MTT.

[0021] Fig. 4 illustrates an exemplary block diagram of the CABAC process.

[0022] Fig. 5 illustrates the cost function calculation to derive a best sign prediction hypothesis for a residual transform block according to Enhanced Compression Model 11 (ECM 11) .

[0023] Fig. 6 illustrates a flowchart of an exemplary video coding system that utilizes prediction computationally efficient scheme to derive template functions according to an embodiment of the present invention.

[0024] Fig. 7 illustrates a flowchart of another exemplary video coding system that utilizes prediction computationally efficient scheme to derive template functions according to an embodiment of the present invention.DETAILED DESCRIPTION OF THE INVENTION

[0025] It will be readily understood that the components of the present invention, as generally described and illustrated in the figures herein, may be arranged and designed in a wide variety of different configurations. Thus, the following more detailed description of the embodiments of the systems and methods of the present invention, as represented in the figures, is not intended to limit the scope of the invention, as claimed, but is merely representative of selected embodiments of the invention. References throughout this specification to “one embodiment, ” “an embodiment, ” or similar language mean that a particular feature, structure, or characteristic described in connection with the embodiment may be included in at least one embodiment of the present invention. Thus, appearances of the phrases “in one embodiment” or “in an embodiment” in various places throughout this specification are not necessarily all referring to the same embodiment.

[0026] Furthermore, the described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments. One skilled in the relevant art will recognize, however, that the invention can be practiced without one or more of the specific details, or with other methods, components, etc. In other instances, well-known structures, or operations are not shown or described in detail to avoid obscuring aspects of the invention. The illustrated embodiments of the invention will be best understood by reference to the drawings, wherein like parts are designated by like numerals throughout. The following description is intended only by way of example, and simply illustrates certain selected embodiments of apparatus and methods that are consistent with the invention as claimed herein.

[0027] Joint Video Expert Team (JVET) of ITU-T SG16 WP3 and ISO / IEC JTC1 / SC29 / WG11 are currently in the process of exploring the next-generation video coding standard. Some promising new coding tools have been adopted into Enhanced Compression Model 11 (ECM 11) (M. Coban, et al., “Algorithm description of Enhanced Compression Model 11 (ECM 11) , ” Joint Video Expert Team (JVET) of ITU-T SG 16 WP 3 and ISO / IEC JTC 1 / SC 29, 32nd Meeting, Hannover, DE, 13–20 October 2023, Doc. JVET-AF2025) to further improve VVC. The adopted new tools have been implemented in the reference software ECM-11.0 [3] . Particularly, a new method for jointly predicting a collection of signs of transform coefficient levels in a residual transform block has been developed. In ECM 11, to derive a best sign prediction hypothesis for a residual transform block, a cost function is defined as discontinuity measure across block boundaries shown on Fig. 5. The cost function is calculated as a sum of absolute second derivatives in the residual domain for the above row and left column as follows:

[0028] In the above equation, R is reconstructed neighbours, P is prediction of the current block, and r is the residual hypothesis. The allowed maximum number of the predicted signs Nsp for each sign prediction hypothesis in a transform block is signalled in the sequence parameter set (SPS) and is constrained to be less than or equal to 8 in ECM-11.0.

[0029] When the number of jointly predicted signs is equal to N, 2N different sign prediction hypotheses can be formed by different combinations of predicted signs. The cost function is measured for all residual hypotheses (each derived from a sign prediction hypothesis) , and the hypothesis leading to the smallest cost is selected as a predictor for coefficient signs. In ECM-11.0, a transform block area allowed for sign prediction is further specified by an SPS syntax element. The signs of first Nsp non-zero coefficients (if available) are collected and predicted according to a raster-scan order from the specified sign prediction area. For those transform coefficients subject to sign prediction, a sign prediction bin indicating whether the sign of a current transform coefficient is equal to the predicted sign by the selected hypothesis is signalled. This sign prediction bin is context coded, where the selected context for entropy coding a sign prediction for a coefficient is determined by whether an absolute value of the coefficient is greater than one or not. The contexts are separated for intra and inter blocks, for luma and chroma components. For other transform coefficients without being assigned for sign prediction, the corresponding signs are just coded by CABAC in the bypass mode.

[0030] A residual signal r can be reconstructed by an inverse transformation of a transform block. It can be computed as the summation of each synthesis basis function (inverse transformation matrix) Ai multiplied by the corresponding coefficient value ci over all transform coefficients, as follows: r=∑i ci ·Ai ,                                         (2) where Ai is the inverse transformation matrix for a transform coefficient index i and can be calculated  by an inverse transformation of a transform block with ci = 1 and cj = 0 for all other coefficient indices j ≠ i.

[0031] However, for calculating a boundary matching cost corresponding to a sign hypothesis according to eqn. (1) , we only need the entry values of each inverse transformation matrix along the top and left block boundaries as indicated by orange samples in Fig. 5.

[0032] To determine the best sign hypothesis among 2N sign hypotheses, a boundary matching cost function such as eqn. (1) can be calculated for each sign hypothesis in order of Gray code with a codeword length equal to the number of signs to be predicted, as follows: idxGidx= (idx ^ (idx >> 1) ) , where “^” indicates a bitwise exclusive OR operator and “>>” indicates a right shift operator. Table  1 shows the mapping between Gray codes and codewords with length equal to 4. Table 1. Mapping Table for Gray Code

[0033] The current value of the Gray code indicates the current sign hypothesis for predicting N signs. Each bit in a Gray codeword indicates a predicted sign for an associated transform coefficient that is subject to sign prediction. Each “0” in a Grey codeword indicates a corresponding predicted sign in a sign hypothesis is positive, and each “1” indicates a corresponding predicted sign is negative. An initial residual hypothesis r0 (corresponding to Gray code 0000 in Table 1) is first generated by inverse transformation of a transform block with all unknown signs set to be positive, as follows: where S is a set of transform coefficient indices for transform coefficients that are subject to sign  prediction in a transform block and |ci| returns the absolute value of a transform coefficient ci.

[0034] The Hamming distance between any two adjacent Gray codewords is equal to 1. Therefore, the next sign prediction hypothesis is just equal to the current sign prediction hypothesis except for one predicted sign being flipped. The next residual hypothesis rn+1 can thus be calculated based on the current residual hypothesis rn, as follows: rn+1=rn-2·|cj|·Aj when sign flipping is from “0” to “1” (from “+” to “- “) , (4) rn+1 =rn+2·|cj|·Aj when sign flipping is from “1” to “0” (from “- “to “+” ) , where j is the index of the transform coefficient corresponding to the current Gray codeword index  having a sign flip.

[0035] For example, the Gray codeword for the residual hypothesis r1 (corresponding to Gray code 0001 in Table 1) indicates a sign flip in bit index 0 from “+” to “- “compared with the Gray codeword for r0. The residual hypothesis r1 can thus be calculated as r0-2·|ck|·Ak, where k is the transform coefficient index associated with Gray codeword bit index 0. All remaining residual hypothesis (for n > 1) can be derived similarly one by one. Given a residual hypothesis corresponding to a particular sign hypothesis, the corresponding cost can be calculated by a cost function such as eqn. (1) .

[0036] To speed up computation of costs associated with individual hypothesis, the entry values of an inverse transformation matrix along the top and left block boundaries for each transform coefficient index i within the specified sign prediction area can be stored as a normalized template function Ti . For a transform block with width W and height H, each normalized template function only needs to store (W + H -1) sample values for calculating a block boundary matching cost according to eqn. (1) . For sign prediction in a current transform block, a video coder can calculate a template function equal to |ck|·Tk for each transform coefficient with index k subject to sign prediction in the current transform block. The next residual hypothesis rn+1 can thus be calculated based on the current residual hypothesis rn and a template function, as follows: rn+1=rn-2·|cj|·Tj when sign flipping is from “0” to “1” (from “+” to “- “) , (5) rn+1=rn+2·|cj|·Tj when sign flipping is from “1” to “0” (from “- “to “+” ) .

[0037] The normalized template functions can be stored for each transform coefficient index i within the specified sign prediction area for all transform types and block dimensions. The normalized template sample values can be derived and stored at a reduced bit depth to lower storage cost and computational complexity.

[0038] In the present invention, new methods are proposed to further improve sign prediction in performance or complexity in an image or video coding system. In the proposed methods, a video coder may comprise predicting one or more signs of transform coefficients in a current residual block based on prediction and coded residual information on the current block and the reconstructed neighbouring samples, wherein the coded residual information may comprise the absolute values of transform coefficients in the current block and the signs of transform coefficients not subject to sign prediction in the current block. The video coder may further comprise a specified sign prediction area for the current transform block, wherein the specified sign prediction area can be pre-defined or indicated by syntax information. The video coder may further comprise determining a collection of transform coefficients subject to sign prediction from the specified sign prediction area in the current transform block based on some specified rule. The video coder may determine one or more predicted signs based on a plurality of residual hypotheses, wherein the plurality of residual hypotheses is derived from the coded residual information. The video coder may further comprise deriving one or more template functions for calculating the plurality of residual hypotheses, wherein one or more template functions may be derived from a set of normalized template functions that approximate the inverse transformation matrices along the top and left block boundaries for the current transform block.

[0039] In one method, it is proposed to employ the template functions corresponding to the transform coefficients subject to sign prediction for reconstructing an initial residual hypothesis, as follows:

[0040] An initial residual hypothesis for a transform block can be constructed according to the following steps: ● An initial residual hypothesis is first derived by inverse transformation of the de-quantized  coefficients in the transform block, wherein the values of all transform coefficients subject to sign prediction (with index i∈S) are set equal to 0. ● For each transform coefficient subject to sign prediction, the value of the corresponding  template function is further added to the value of the initial residual hypothesis for each block boundary sample.

[0041] The next residual hypothesis can be derived from the current residual hypothesis and a template function corresponding to the transform coefficient index with a sign flip according to eqn. (5) . In this way, the initial residual hypothesis and the subsequent residual hypotheses are reconstructed based on the same set of the synthesis functions for the transform coefficients subject to sign prediction.

[0042] The normalized template functions can be utilized to approximate the corresponding inverse transformation matrices along block boundaries. A video coder can store the normalized template functions for different transform types and block dimensions to speed up derivation of different residual hypotheses. In another method, it is proposed to utilize template functions corresponding to all non-zero coefficients for deriving an initial residual hypothesis when nonzero transform coefficients are all within the specified sign prediction area in a current transform block, as follows: r0=∑i∈S |ci|·Ti+ ∑i∈B ci·Ti  (7) where B is a set of transform coefficient indices associated with the transform coefficients that are  within the specified sign prediction area but are not subject to sign prediction in a current transform block. In this way, an initial residual hypothesis can be derived at reduced computational complexity without an inverse transformation operation.

[0043] An initial residual hypothesis can be constructed according to the following steps: ● The value of an initial residual hypothesis is set equal to 0 for each block boundary sample. ● For each transform coefficient within the sign prediction area (i.e., with index i∈SP) , the  value of the corresponding template function is further added to or subtracted from the value of the initial residual hypothesis according to the corresponding sign for each block boundary sample, wherein each unknown sign is set to be positive.

[0044] When non-zero transform coefficients are not all within the specified sign prediction area in a transform block, several schemes are proposed for deriving an initial residual hypothesis. In Scheme A, it is proposed to first zero out all transform coefficients outside the sign prediction area and utilize the template functions corresponding to transform coefficient indices within the specified sign prediction area for deriving an initial residual hypothesis according to eqn. (7) . In this scheme, the inverse transformation operation can be completely skipped for deriving an initial residual hypothesis. When non-zero transform coefficients are not all within the specified sign prediction area in a transform block, an initial residual hypothesis can be constructed according to the following steps: ● The value of an initial residual hypothesis is set equal to 0 for each block boundary sample. ● For each transform coefficient within the sign prediction area (i.e., with index i∈SP) , the  value of the corresponding template function is further added to or subtracted from the value of the initial residual hypothesis according to the corresponding sign for each block boundary sample, wherein each unknown sign is set to be positive.

[0045] In Scheme B, it is proposed to utilize the template functions corresponding to transform coefficients within the sign prediction area and the inverse transformation matrices for deriving an initial residual hypothesis, as follows: where SP is a set of transform coefficient indices associated with the specified transform block area  that is allowed for sign prediction.

[0046] When non-zero transform coefficients are not all within the specified sign prediction area in a transform block, an initial residual hypothesis can be constructed according to the following steps: ● An initial residual hypothesis is first derived by inverse transformation of the de-quantized  coefficients, wherein the values of all transform coefficients within the sign prediction area (with index i∈SP) are set equal to 0. ● For each transform coefficient within the sign prediction area, the value of the corresponding  template function is further added to or subtracted from the value of the initial residual hypothesis according to the corresponding sign for each block boundary sample, wherein each unknown sign is set to be positive.

[0047] In Scheme C, it is proposed to utilizing the template functions corresponding to all non-zero coefficients subject to sign prediction and the inverse transformation matrices for deriving an initial residual hypothesis according to eqn. (6) . When non-zero transform coefficients are not all within the specified sign prediction area in a transform block, an initial residual hypothesis for a transform block can be constructed according to the following steps: ● An initial residual hypothesis is first derived by inverse transformation of the de-quantized  coefficients in the transform block, wherein the values of all transform coefficients subject to sign prediction (i.e., with index i ∈S) are set equal to 0. ● For each transform coefficient subject to sign prediction, the value of the corresponding  template function is further added to the value of the initial residual hypothesis for each block boundary sample.

[0048] In Scheme D, when non-zero transform coefficients are not all within the specified sign prediction area in a transform block, it is proposed to simply apply the inverse transformation on the de-quantized coefficients with the predicted signs all set equal to positive signs for deriving an initial residual hypothesis according to eqn. (3) .

[0049] Any of the foregoing proposed methods of initial residual hypothesis derivation can be implemented in encoders and / or decoders. For example, any of the proposed methods can be implemented in an inter / intra / IBC / prediction / transform module of an encoder, and / or an inter / intra / IBC / prediction / transform module of a decoder. Alternatively, any of the proposed methods can be implemented as a circuit coupled to the inter / intra / IBC / prediction / transform module of the encoder and / or the inter / intra / IBC / prediction / transform module of the decoder, so as to provide the information needed by the inter / intra / IBC / prediction / transform module.

[0050] With reference to the exemplary encoder and decoder in Fig. 1A and Fig. 1B, any of the proposed methods of initial residual hypothesis derivation can be implemented in an Intra / Inter / Entropy coding module (e.g. Intra Pred. 150 / MC 150 / Entropy Decoder 140 in Fig. 1B) in a decoder or an Intra / Inter / Entropy coding module (e.g. Intra Pred. 110 / Inter Pred. 112 / Entropy Encoder 122 in Fig. 1A) in an encoder. Any of the proposed methods can also be implemented as a circuit coupled to the intra / inter coding module at the decoder or the encoder. However, the decoder or encoder may also use additional processing unit to implement the required processing. While the Intra Pred. units (e.g. unit 110 in Fig. 1A and unit 150 in Fig. 1B) are shown as individual processing units, they may correspond to executable software or firmware codes stored on a media, such as hard disk or flash memory, for a CPU (Central Processing Unit) or programmable devices (e.g. DSP (Digital Signal Processor) or FPGA (Field Programmable Gate Array) ) .

[0051] Fig. 6 illustrates a flowchart of an exemplary video coding system that utilizes prediction computationally efficient scheme to derive template functions according to an embodiment of the present invention. The steps shown in the flowchart may be implemented as program codes executable on one or more processors (e.g., one or more CPUs) at the encoder side. The steps shown in the flowchart may also be implemented based hardware such as one or more electronic devices or processors arranged to perform the steps in the flowchart. According to this method, input data is received in step 610, wherein the input data comprises coded transform coefficients corresponding to a residual block of a current block in an encoder side or the input data comprises transform coefficients corresponding to the residual block of the current block. A set of sign-predicted transform coefficients from the transform coefficients corresponding to the residual block of the current block is determined in step 620. Block boundary samples for the current block are determined in step 630. An initial residual hypothesis is derived in step 640 by applying inverse transformation to de-quantized transform coefficients with the set of sign-predicted transform coefficients set to zero or by applying the inverse transformation to the de-quantized transform coefficients corresponding to non-sign-predicted transform coefficients only to form a first part of the initial residual hypothesis, and then adding a second part by summing up products of normalized template functions and absolute values of respective sign-predicted transform coefficients for the set of sign-predicted transform coefficients, wherein the normalized template functions represent approximated entry values of inverse transformation matrixes along top and left block boundaries for corresponding transform coefficient indexes associated with the respective sign-predicted transform coefficients. Remaining residual hypotheses associated with combinations of a set of signs for the set of sign-prediction transform coefficients are derived in step 650, wherein each combination of the set of signs is assigned with one transform coefficient index, and wherein each of remaining residual hypotheses is derived from a previous residual hypothesis and a target template function corresponding to a target transform coefficient index with a sign flip. Boundary costs for all residual hypotheses are evaluated in step 660, wherein each of boundary costs is measured on the block boundary samples. A target combination of the set of signs is determined based on a minimum cost among the boundary costs in step 670. The set of signs associated with the set of sign-predicted transform coefficients is encoded or decoded by using predicted signs corresponding to the target combination of the set of signs in step 680.

[0052] Fig. 7 illustrates a flowchart of another exemplary video coding system that utilizes prediction computationally efficient scheme to derive template functions according to an embodiment of the present invention. According to this method, input data is received in step 710, wherein the input data comprises coded transform coefficients corresponding to a residual block of a current block in an encoder side or the input data comprises transform coefficients corresponding to the residual block of the current block. A set of sign-predicted transform coefficients from the transform coefficients corresponding to the residual block of the current block is determined in step 720. A specified sign prediction area is determined in step 730, wherein normalized template functions along left and top block boundaries are stored for transform coefficient indices within the specified sign prediction area, and wherein each of the normalized template functions represents approximated entry values of an inverse transformation matrix along the top and left block boundaries for one transform coefficient index. An initial residual hypothesis is derived in step 740, wherein the initial residual hypothesis comprises a first part and a second part, the first part is generated by summing up products of absolute values of sign-predicted transform coefficients and respective normalized template functions for the set of sign-predicted transform coefficients, and the second part is generated by summing up products of values of non-sign-predicted transform coefficients within the specified sign prediction area and the respective normalized template functions. Remaining residual hypotheses associated with combinations of a set of signs for the set of sign-prediction transform coefficients are deriving in step 750. Boundary costs for all residual hypotheses are evaluated in step 760, wherein each of boundary costs is measured on block boundary samples. A target combination of the set of signs is determined based on a minimum cost among the boundary costs in step 770. The set of signs associated with the set of sign-predicted transform coefficients is encoded or decoded by using predicted signs corresponding to the target combination of the set of signs in step 780.

[0053] The flowcharts shown are intended to illustrate an example of video coding according to the present invention. A person skilled in the art may modify each step, re-arranges the steps, split a step, or combine steps to practice the present invention without departing from the spirit of the present invention. In the disclosure, specific syntax and semantics have been used to illustrate examples to implement embodiments of the present invention. A skilled person may practice the present invention by substituting the syntax and semantics with equivalent syntax and semantics without departing from the spirit of the present invention.

[0054] The above description is presented to enable a person of ordinary skill in the art to practice the present invention as provided in the context of a particular application and its requirement. Various modifications to the described embodiments will be apparent to those with skill in the art, and the general principles defined herein may be applied to other embodiments. Therefore, the present invention is not intended to be limited to the particular embodiments shown and described, but is to be accorded the widest scope consistent with the principles and novel features herein disclosed. In the above detailed description, various specific details are illustrated in order to provide a thorough understanding of the present invention. Nevertheless, it will be understood by those skilled in the art that the present invention may be practiced.

[0055] Embodiment of the present invention as described above may be implemented in various hardware, software codes, or a combination of both. For example, an embodiment of the present invention can be one or more circuit circuits integrated into a video compression chip or program code integrated into video compression software to perform the processing described herein. An embodiment of the present invention may also be program code to be executed on a Digital Signal Processor (DSP) to perform the processing described herein. The invention may also involve a number of functions to be performed by a computer processor, a digital signal processor, a microprocessor, or field programmable gate array (FPGA) . These processors can be configured to perform particular tasks according to the invention, by executing machine-readable software code or firmware code that defines the particular methods embodied by the invention. The software code or firmware code may be developed in different programming languages and different formats or styles. The software code may also be compiled for different target platforms. However, different code formats, styles and languages of software codes and other means of configuring code to perform the tasks in accordance with the invention will not depart from the spirit and scope of the invention.

[0056] The invention may be embodied in other specific forms without departing from its spirit or essential characteristics. The described examples are to be considered in all respects only as illustrative and not restrictive. The scope of the invention is therefore, indicated by the appended claims rather than by the foregoing description. All changes which come within the meaning and range of equivalency of the claims are to be embraced within their scope.

Claims

1.A method of video coding, the method comprising:receiving input data, wherein the input data comprises coded transform coefficients corresponding to a residual block of a current block in an encoder side or the input data comprises transform coefficients corresponding to the residual block of the current block;determining a set of sign-predicted transform coefficients from the transform coefficients corresponding to the residual block of the current block;determining block boundary samples for the current block;deriving an initial residual hypothesis by applying inverse transformation to de-quantized transform coefficients with the set of sign-predicted transform coefficients set to zero or by applying the inverse transformation to the de-quantized transform coefficients corresponding to non-sign-predicted transform coefficients only to form a first part of the initial residual hypothesis, and then adding a second part by summing up products of normalized template functions and absolute values of respective sign-predicted transform coefficients for the set of sign-predicted transform coefficients, wherein the normalized template functions represent approximated entry values of inverse transformation matrixes along top and left block boundaries for corresponding transform coefficient indexes associated with the respective sign-predicted transform coefficients;deriving remaining residual hypotheses associated with combinations of a set of signs for the set of sign-prediction transform coefficients, wherein each combination of the set of signs is assigned with one transform coefficient index, and wherein each of remaining residual hypotheses is derived from a previous residual hypothesis and a target template function corresponding to a target transform coefficient index with a sign flip;evaluating boundary costs for all residual hypotheses, wherein each of boundary costs is measured on the block boundary samples;determining a target combination of the set of signs based on a minimum cost among the boundary costs; andencoding or decoding the set of signs associated with the set of sign-predicted transform coefficients by using predicted signs corresponding to the target combination of the set of signs.2.The method of Claim 1, wherein the initial residual hypothesis and the remaining residual hypotheses are all reconstructed based on a same set of synthesis functions for the set of sign-predicted transform coefficients.3.The method of Claim 1, wherein the block boundary samples comprise predicted samples of the current block adjacent to block boundary and reconstructed neighbouring samples of the current block adjacent to the block boundary.4.The method of Claim 1, wherein the normalized template functions are pre-calculated and stored for subsequent calculation of the initial residual hypothesis and remaining residual hypotheses.5.An apparatus of video coding, the apparatus comprising one or more electronic circuits or processors arranged to:receive input data, wherein the input data comprises coded transform coefficients corresponding to a residual block of a current block in an encoder side or the input data comprises transform coefficients corresponding to the residual block of the current block;determine a set of sign-predicted transform coefficients from the transform coefficients corresponding to the residual block of the current block;determine block boundary samples for the current block;derive an initial residual hypothesis by applying inverse transformation to de-quantized transform coefficients with the set of sign-predicted transform coefficients set to zero or by applying the inverse transformation to the de-quantized transform coefficients corresponding to non-sign-predicted transform coefficients only to form a first part of the initial residual hypothesis, and then adding a second part by summing up products of normalized template functions and absolute values of respective sign-predicted transform coefficients for the set of sign-predicted transform coefficients, wherein the normalized template functions represent approximated entry values of inverse transformation matrixes along top and left block boundaries for corresponding transform coefficient indexes associated with the respective sign-predicted transform coefficients;derive remaining residual hypotheses associated with combinations of a set of signs for the set of sign-prediction transform coefficients, wherein each combination of the set of signs is assigned with one transform coefficient index, and wherein each of remaining residual hypotheses is derived from a previous residual hypothesis and a target template function corresponding to a target transform coefficient index with a sign flip;evaluate boundary costs for all residual hypotheses, wherein each of boundary costs is measured on the block boundary samples;determining a target combination of the set of signs based on a minimum cost among the boundary costs; andencode or decode the set of signs associated with the set of sign-predicted transform coefficients by using predicted signs corresponding to the target combination of the set of signs.6.A method of video coding, the method comprising:receiving input data, wherein the input data comprises coded transform coefficients corresponding to a residual block of a current block in an encoder side or the input data comprises transform coefficients corresponding to the residual block of the current block;determining a set of sign-predicted transform coefficients from the transform coefficients corresponding to the residual block of the current block;determining a specified sign prediction area, wherein normalized template functions along left and top block boundaries are stored for transform coefficient indices within the specified sign prediction area, and wherein each of the normalized template functions represents approximated entry values of an inverse transformation matrix along the top and left block boundaries for one transform coefficient index;deriving an initial residual hypothesis, wherein the initial residual hypothesis comprises a first part and a second part, the first part is generated by summing up products of absolute values of sign-predicted transform coefficients and respective normalized template functions for the set of sign-predicted transform coefficients, and the second part is generated by summing up products of values of non-sign-predicted transform coefficients within the specified sign prediction area and the respective normalized template functions;deriving remaining residual hypotheses associated with combinations of a set of signs for the set of sign-prediction transform coefficients;evaluating boundary costs for all residual hypotheses, wherein each of boundary costs is measured on block boundary samples;determining a target combination of the set of signs based on a minimum cost among the boundary costs; andencoding or decoding the set of signs associated with the set of sign-predicted transform coefficients by using predicted signs corresponding to the target combination of the set of signs.7.The method of Claim 6, wherein if all non-zero transform coefficients of the current block are within the specific sign prediction area, the initial residual hypothesis comprises only the first part and the second part.8.The method of Claim 6, wherein if one or more non-zero transform coefficients of the current block are not within the specific sign prediction area, values of said one or more non-zero transform coefficients of the current block are set to 0 and the initial residual hypothesis comprises only the first part and the second part.9.An apparatus of video coding, the apparatus comprising one or more electronic circuits or processors arranged to:receive input data, wherein the input data comprises coded transform coefficients corresponding to a residual block of a current block in an encoder side or the input data comprises transform coefficients corresponding to the residual block of the current block;determine a set of sign-predicted transform coefficients from the transform coefficients corresponding to the residual block of the current block;determine a specified sign prediction area, wherein normalized template functions along left and top block boundaries are stored for transform coefficient indices within the specified sign prediction area, and wherein each of the normalized template functions represents approximated entry values of an inverse transformation matrix along the top and left block boundaries for one transform coefficient index;derive an initial residual hypothesis, wherein the initial residual hypothesis comprises a first part and a second part, the first part is generated by summing up products of absolute values of sign-predicted transform coefficients and respective normalized template functions for the set of sign-predicted transform coefficients, and the second part is generated by summing up products of values of non-sign-predicted transform coefficients within the specified sign prediction area and the respective normalized template functions;derive remaining residual hypotheses associated with combinations of a set of signs for the set of sign-prediction transform coefficients;evaluate boundary costs for all residual hypotheses, wherein each of boundary costs is measured on block boundary samples;determine a target combination of the set of signs based on a minimum cost among the boundary costs; andencode or decode the set of signs associated with the set of sign-predicted transform coefficients by using predicted signs corresponding to the target combination of the set of signs.