Patent Description:
A transform T transforms a block of n pixels into n transformed coefficients. The process is invertible by applying the inverse transform T-<NUM> to the transformed coefficients to get the pixel values back. In the case of a partial transform P, the n pixels are transformed into less than n transformed coefficients, m where m<n. Equivalently, it can be assumed that the missing m-n coefficients are set to zero. An approximate "inverse" transform P' is applied to the transformed coefficients to obtain an approximation of the initial pixel values. P' is an approximation and not an exact mathematical inverse because the partial transform is not invertible. Typically, a partially transformed block of coefficients are representative of the low frequency information of the pixel block.

In some video coding standards, transformed coefficients are put into a two dimensional (2D) block to which is associated a scanning order; typically, from high frequency to low frequency. After quantization of the coefficients, the first, relative to the high to low frequency scan order, non-zero quantized coefficient is called the last coded coefficient, as shown on <FIG>.

In the 2D block topology associated to the coefficients, the last coded coefficient has two coordinates (x,y) as shown on <FIG> for a block of size n=NxN. By definition, <NUM>≤x, y≤N-<NUM>. These two coordinates are coded into the bit-stream as information to determine the non-zero coded coefficients on the decoder side. At the least, these coordinates indicate that the coefficient of coordinate (x,y) is not zero, and the coefficients coming after this coefficient, relative to the low to high scanning order, are all zero.

Additional information indicating significance of transformed coefficients may be added to signal whether the remaining coefficients (question-marked on <FIG>) are zero or not.

Conventionally, in many video and image codecs developed in the last decades, fixed transforms, such as the Discrete Cosine Transform or Discrete Sine Transform, for example, are applied to the pixels of each block to obtain the transformed coefficients. These coefficients are then quantized by a quantifier Q to obtain quantized coefficients which are encoded by an entropy coder, such as VLC, arithmetic coder, or Context Adaptive Binary Arithmetic Coding (CABAC), for example.

It is desired to encode the last coded coefficient position as efficiently as possible.

As an alternative to fixed transforms, content-adaptive partial transforms can be used. This leads to a better compression of energy, thus reducing the bit rate. However, the adaptive transforms must be sent to the decoder, increasing the bitrate in return. If one does not take care in sending such the transforms, the global bit rate increases, despite the better compression, and the adaptive transforms are of no benefit.

The HEVC/H. <NUM> standard introduced the coding of the last coded coefficient position by using two coordinates (x,y). Each coordinate is binarized using a truncated unary code, and then each bit, or "bin" in the HEVC terminology, is encoded using CABAC with channel adaptation based on contexts. In HEVC, the two coordinates x and y are encoded and decoded separately. In a similar domain, document <CIT> discloses a method for optimizing context for last significant coefficient position coding, document <NPL>; Guangzhou: (Motion picture expert group or ISO/IEC JTC1/SC29/WG11), N° M18247, <NUM> October <NUM> discloses low complexity transforms and paetial frequency transforms, document <NPL>; DEAGU; (Joint collaborative team on video coding of ISO/IEC JTC1/SC29/WG11 abd ITU-T SG. <NUM>); JCTVC-D226, <NUM> January <NUM> discloses a low complexity entropy coding method and document <CIT> discloses a method for coding and decoding a position of a last significant coefficient.

These and other drawbacks and disadvantages of the prior art are addressed by the present principles, which are directed to a method and apparatus for coding a last coded coefficient, obtained through use of a partial transform, using knowledge of the size of the partial transform.

According to a first aspect of the present principles, a method for coding.

In an embodiment, an information representative of the size of the partial transform is encoded in a bitstream.

In an embodiment, an adaptive set of partial transforms that are learned offline is used to transform the block of image values.

According to a second aspect of the present principles, an apparatus for coding.

According to an embodiment, an information representative of the size of the partial transform is encoded in a bitstream.

According to a third aspect of the present principles, a method is provided for decoding
a set of transform coefficients, comprising:
entropy decoding a code to generate a position of a last non-zero transform coefficient of a block of a second number of transform coefficients, the position of the last non-zero transform coefficient being determined by a scanning of the transformed coefficients, the block of transform coefficients being a result of a partial transform transforming an initial block of a first number of image values into the block of transform coefficients, the second number being less than the first number and being representative of a size of the partial transform,.

In an embodiment, an information representative of the size of the partial transform is decoded from a bitstream.

According to a fourth aspect of the present principles, an apparatus is provided for decoding
a set of transform coefficients, comprising:.

In an embodipent, an information representative of the size of the partial transform is decoded from a bitstream. According to fifth aspect of the present principles, a non-transitory computer readable storage medium is provided having stored thereon instructions for implementing the method of the first or the third aspect.

According to another aspect of the present principles, a non-transitory computer readable storage medium is provided having stored thereon a bitstream generated by the method of the first aspect or by the apparatus of the second aspect.

These and other aspects, features and advantages of the present principles will become apparent from the following detailed description of exemplary embodiments, which are to be read in connection with the accompanying drawings.

The technical problem solved by the following embodiments is reducing the cost of coding the position of the last coded coefficient in a transformed block of pixels to which a 2D partial transform has been applied.

These embodiments are an improvement of the entropy coding scheme commonly used in video coding standards. One such video coding standard is the HEVC/H. <NUM> standard, but the embodiments are not limited to that standard.

The main idea of the present principles is that if a partial transform is used on a block of pixel values, it is known that some transformed coefficients are necessarily zero, thus imposing some constraints on the position of the last coded coefficient and on the coordinates representing the position of the last coded coefficient (x,y). In the described embodiments, the focus is on using such constraints to efficiently encode the two coordinates (x,y) in case a partial transform is used to transform a block of pixels to transform coefficients.

The present ideas use the fact that not all coordinate pairs (x,y) are acceptable in the case where m<n so that the coding of (x,y) is more efficient. This can lead to improved compression performance.

In particular, if one uses partial transforms, it implicitly takes into account the fact that not all coordinate pairs (x,y) are acceptable, such that the coding of (x,y) is more efficient. In this particular embodiment with partial transforms, tests have been conducted on a modified HEVC standard using partial transforms and it has been shown that an improved coding of (x,y) leads to a compression gain of about -<NUM>%.

The ideas presented herein propose to keep the main part of the HEVC algorithm to code the coordinate pair (x,y), but it adds a feature, that is, the reduction of possible range of coding y once x is known.

For instance, as in <FIG>, consider a 4x4 block with a partial transform P leading to m=<NUM> transformed coefficients. As a consequence, one knows that coefficients <NUM> through <NUM> can be non-zero, but coefficients <NUM> to <NUM> are necessarily zero.

The coordinate x for the last coded coefficient is in the range <NUM> (for positions <NUM>, <NUM>, <NUM>, <NUM>) to <NUM> (only for the position <NUM>). Once x is known, the range of y actually depends on x. In the example above, one has:.

One easily understands that this process of coding is decodable as one decodes x, then deduces the range for y, assuming that m is known and encoded somewhere, then decodes y.

In HEVC, a coordinate x or y is split into a prefix and a suffix as shown in <FIG>. For instance, if the coordinate value is <NUM>, the prefix is <NUM> and the suffix is coded in <NUM> bits. The suffix is the remainder after the first value is subtracted from the coordinate value, <NUM>-<NUM> =<NUM>. If the coordinate value is <NUM>, then the prefix is <NUM>, but there is no suffix.

The prefix is binarized using a truncated unary coding. The truncation is performed based on the knowledge of the block size that provides an upper bound for the prefix value. Each bit of the binarized prefix is encoded using CABAC and a dedicated context.

For instance, in a 4x4 block the possible prefix are <NUM>, <NUM>, <NUM> or <NUM> which are respectively binarized into <NUM>, <NUM>, <NUM> and <NUM> (truncated). In another example, in a 8x8 block, the possible prefix are from <NUM> to <NUM> and binarized into <NUM>, <NUM>, <NUM>, <NUM>, <NUM> and <NUM> (truncated).

The suffix is binarized using a fixed length coding, and the fixed length suffix is encoded as is, using CABAC in bypass mode without using contexts. For instance, if the coordinate value is <NUM> in a 16x16 block, the prefix is <NUM> (binarized into <NUM>) and the suffix is <NUM> (binarized into <NUM> and coded on <NUM> bits).

The binarization process into prefix and suffix is kept as in HEVC, using contexts only for the prefix. The main characteristic of the present principles is that the contexts of y can be reduced in range, depending on the value of x.

Usually, a transform T transforms a block of n pixels into m=n transformed coefficients. The process is invertible by applying the inverse transform T-<NUM> to the transformed coefficients to get the pixel values back. In case of a partial transform P, the n pixels are transform into less m<n transformed coefficients. Equivalently, it may be assumed the lacking m-n coefficients are set to zero. An "inverse" transform P' (of course not the mathematical inverse because the partial transform is not invertible) is applied to the transformed coefficient to obtain an approximation of the initial pixel values. Typically, partially transformed coefficients are representative of the low frequency information of the pixel block.

If a partial transform is used, it is known that some m-n transformed coefficients are necessarily zero, thus imposing some constraints on the position of the last coded coefficient and on the coordinates (x,y). In this case, by implicitly using these constraints, it is shown that the embodiment automatically handles the efficient encoding of the two coordinates (x,y) in case a partial transform is used to transform the TU pixels to transformed coefficients.

Instead of the systematic transforms such as DCT or DST, an adaptive set of orthogonal transforms may be used instead that are learned offline on a large training set using different classification and transform optimization schemes. This set of transforms is fed to a codec and the best transform out of a set is chosen in a Rate Distortion Optimization (RDO) loop. A more adaptive approach is to learn a set of orthogonal transforms for a particular intra frame of a sequence. This is referred to as an on-the-fly block based transform learning scheme in the rest of the specification. This scheme is shown in <FIG>.

The block diagram of <FIG> shows a typical on-the-fly scheme in which the algorithm is split into two parts, i.e. classification of the residual blocks inside the video/image codec and generation of the new set of transforms. The first step classifies the residual blocks into K different classes (S<NUM>. In the second step, a new transform is obtained for each class using minimization of the reconstruction error for that particular class. Typically, Singular Value Decomposition (SVD) and (Karhunen-Loève Transform) KLT are used to generate an orthogonal set of transforms. These two steps are iterated until convergence of the solution or a stop criterion is reached. As seen in the block diagram, the input to the system is an intra frame or an image along with some initial set of non-separable orthogonal transforms (T<NUM>. The system outputs a set of learned transforms (T'<NUM>. T'K) along with the syntax information that need to be encoded into the bit-stream which is sent to the decoder. In general, the overhead bits required to encode these transform basis vectors is significantly large compared to the bits required to encode the frame.

Due to the energy compaction property of SVD, it is observed that the overhead cost can be considerably reduced by deducing an incomplete representation of the learned transform where, only first 'm' vectors are transmitted to the decoder and the remaining (n - m) transform vectors are either generated using a completion algorithm similar to the Gram-Schmidt method or forced to zero, thus leading to a partial transform.

In order to illustrate the effect of dropping the last few vectors of a transform on the Bjontegaard Distortion rate (BD-rate), four non-separable optimized transforms of size 64x64 are learned on the <NUM> sequences 'PeopleOnStreet' and 'Traffic'. Encoding tests are performed on these sequences where the first 'm' vectors are retained and the rest of the basis vectors are then completed using a completion algorithm. <FIG> shows the variation of the performance gain with respect to the number of coded basis vectors. The vertical axis is the percentage gain relative to the anchor (HEVC test software HM15. <NUM>) and without taking the transform cost into account.

It is observed in <FIG> that by retaining just the first half of the transform vectors i.e. m = <NUM>, there is negligible performance drop in terms of BD-rate. For the case of m = <NUM>, i.e. when only first <NUM> basis vectors are coded, the performance drops by <NUM>% compared to the overall bit-rate obtained by coding all 'n' basis vectors, but the overhead cost of transform vectors reduces to one fourth of the total overhead. For m = <NUM>, there is considerable loss of performance in terms of BD-rate performance but also reduces the overhead further. In general, this shows that there exists a trade-off between the performance loss and the overhead cost.

Since, the performance drop in terms of BD-rate when encoding only first 'm' transform vectors depends on the video content, a content-adaptive method is necessary to estimate the optimal value of 'm'. Intuitively, at low bit-rates, most of the coefficients are quantized to zero and at high bit rate, the coefficients' energy is significant even at high frequencies. Therefore, the value of 'm' depends on the content as well as the quantization parameter QP.

The residual signal energy on the average is concentrated more in the first few coefficients where, the DC coefficient has on the average maximum energy and it decreases as we go towards the higher frequency coefficients. Therefore, most of the high frequency coefficients are quantized to zero. A simple threshold based method can be applied in order to compute the best value of 'm' which is required to be coded along with the frame as an overhead.

Let E be the sum of energy of the DCT coefficients. A threshold t is defined by the multiplication of a parameter p with E to get, <MAT>.

The value of 'm' can simply be computed from the number of coefficients with average energy greater than this threshold. The value of 'p' can be found experimentally. Table <NUM> shows the variation of the number of vectors 'm' above this threshold for a chosen value of 'p' in terms of percentage of total number of vectors that are encoded. It is observed from Table <NUM> that at high QP, the average number of vectors required are much less compared to that required at low QP. Moreover, the number of vectors 'm' also varies depending on the content.

When the present principles are applied using partial transforms, the range of y depends on x.

Consider again the example of <FIG> using a partial transform with m=<NUM> such that the last <NUM>-<NUM>=<NUM> are always zero. How should one code the coordinate (<NUM>,<NUM>), associated with the coefficient position <NUM>, most efficiently? One possibility is to code x=<NUM> first. Its binarization is <NUM>, as in HEVC. Then, one knows that the possible range for y is <NUM> to <NUM>, so one can use the truncated unary coding up to <NUM>, instead of the truncated unary coding up to <NUM> as in HEVC. This leads to the binarization <NUM> for y, instead of <NUM>. And, one has gained one bit in the binarization process, thus leading to a better compression performance.

Some additional examples of binarization using this embodiment in the example of <FIG>:.

The embodiment with partial transforms easily extends to a coordinate y that uses a suffix, as in <FIG> for an example in an 8x8 TU, using a partial transform with m=<NUM>. The first <NUM> transformed coefficients may be non-zero, but the last <NUM>-<NUM>=<NUM> coefficients are necessarily zero. Let us suppose that the last coded coefficient position is <NUM>. This gives coordinates (x,y) = (<NUM>,<NUM>). The prefix for y is <NUM> and its suffix is <NUM>. In HEVC, the suffix should be coded on <NUM> bit, but in our case, we know that the suffix cannot be <NUM> because the coefficient <NUM>, just below the coefficient <NUM>, is necessarily known in this case to be zero, so the suffix is not coded and one bit of coding is gained.

In the HEVC/H. <NUM> standard, a new tool for coding binary data has been proposed in the arithmetic coder, namely the Context-Adaptive Binary Arithmetic Coding (or CABAC). A binary symbol s, which takes value <NUM> or <NUM>, is coded following a probability p to be <NUM> and <NUM>-p to be <NUM>. This probability is deduced form a context and is adapted after each symbol coding.

A context value is an <NUM> bit value, see <FIG>. The leading bit represents the Most Probable Symbol (or MPS) and the next <NUM> bits represent a probability p' (or state) from which the probability p is deduced.

The update of the context value is made following the process described in <FIG>, depending on whether or not the coded symbol equals the MPS.

The evolution is made through two tables, transldxMPS if the coded symbol is the MPS, and transldxLPS if the coded symbol is not the MPS, i.e., it is the Least Probable Symbol (LPS). These tables are provided in Table <NUM> for the entry p', whose name is pStateldx.

The probability pMPS of the symbol s to be the MPS is quantized linearly on <NUM> bits, from <NUM> to <NUM>. It is deduced from the context value by <MAT> and the probability p of the symbol s to be <NUM> is deduced obviously from pMPS depending on the value of the MPS. <MAT> if MPS=<NUM>, <MAT> if MPS =<NUM>.

Context-Adaptive coding is a powerful tool that allows the coding to dynamically follow the statistics of the channel to which the symbol belongs. Also, each channel should have its own context in order to avoid mixing statistics and losing the benefit of the process. This has led to the extensive use of many contexts in HEVC/H. <NUM>, which uses several hundreds of contexts, in order to model many channels. For instance, among all channels using contexts, there are.

All of these contexts/channels also largely depend on the color channel, that is whether the channel is luma or chroma, the Transform Unit size, the position of the transformed coefficient, the neighboring symbol values and other factors.

As an example, a Coding Group (CG) coding flag is chosen depending on whether or not the CG coding flags below and at the right of the current CG are <NUM> or not, as shown in <FIG>.

All in all, the context choice depends on many things, thus the huge number of contexts. Of course, the decoder must update the context values to correspond with what was performed on the encoder side to ensure synchronization with the encoder and parsing of the stream.

The embodiments described herein propose to reduce the range of potential y coordinate candidates by considering the size of the partial transform used to obtain the coefficients from the image block values.

The associated syntax needed to implement the described principles should be encoding of the value of m the size of the partial transform. This value can be coded at a frame or a slice level such that the improved binarization and truncated unary coding is also determinable at a decoder.

Regarding the decoding process, the principles described herein must accordingly impact a decoder to enable it to decode the last coded coefficient position.

In such embodiments using partial transforms, the improved binarization and truncated unary coding of the y suffix is also impacted.

In addition to the above features of the present principles, the described embodiments provide that the coding of m, or information from which the subset of coefficients can be determined, is present in the bitstream. In addition, the last coded coefficient is provided by two coordinates (x,y) and the subset and the value of x are used to determine a range for y. Also, truncated coding is used for the y prefix and suffix based on the determined range.

The proposed idea is normative in the sense that it is present in the syntax of the video stream and implies a decoding method to be applied. As such, the present ideas can be implemented in a video standard, such as the successor to HEVC.

One embodiment of a method <NUM> for coding a set of transformed coefficients is shown in <FIG>. The method commences at Start block <NUM> and control proceeds to block <NUM> for transforming a block of image values to produce transformed coefficient values. Control proceeds from block <NUM> to block <NUM> for entropy coding the last coded coefficient using knowledge of the size of the transform to code the y coordinate.

One embodiment of an apparatus <NUM> for coding a set of transformed coefficients is shown in <FIG>. The apparatus comprises Transform Circuit <NUM> that receives a block of image values on its input port and produces transformed coefficients on its output port. This output port of Transform Circuit <NUM> is in signal connectivity with the input to Entropy Coder <NUM>. Entropy Coder <NUM> codes the y coordinate of the last coded coefficient position using knowledge of the size of the transform to code the y coordinate to produce a last coded coefficient value.

An embodiment of a method <NUM> for decoding a set of transformed coefficients is shown in <FIG>. The method commences at Start block <NUM> and control proceeds to block <NUM> for entropy decoding a last coded coefficient using knowledge of the size of the transform to decode the y coordinate. Control proceeds from block <NUM> to block <NUM> for inverse transforming coefficients to produce image values.

An embodiment of an apparatus <NUM> for decoding a set of transformed coefficients is shown in <FIG>. The apparatus comprises Entropy Decoder <NUM> that receives transform coefficients including a code for the last coded coefficient and decodes the y coordinate of the last coded coefficient using knowledge of the size of the transform to decode the y coordinate. The output of Entropy Decoder <NUM> is in signal connectivity with the input of Inverse Transform Circuit <NUM>. Inverse Transform Circuit <NUM> receives the transformed coefficients on its input port and inverse transforms them to produce a block of image values on its output port.

The aforementioned embodiments can be implemented in Set Top Boxes (STBs), modems, gateways or other devices that perform video encoding or decoding.

The functions of the various elements shown in the figures can be provided through the use of dedicated hardware as well as hardware capable of executing software in association with appropriate software. Moreover, explicit use of the term "processor" or "controller" should not be construed to refer exclusively to hardware capable of executing software, and may implicitly include, without limitation, digital signal processor ("DSP") hardware, read-only memory ("ROM") for storing software, random access memory ("RAM"), and non-volatile storage.

All examples and conditional language recited herein are intended for pedagogical purposes to aid the reader in understanding the present principles and the concepts contributed by the inventor(s) to furthering the art, and are to be construed as being without limitation to such specifically recited examples and conditions.

Moreover, all statements herein reciting principles, aspects, and embodiments of the present principles, as well as specific examples thereof, are intended to encompass both structural and functional equivalents thereof.

Thus, for example, it will be appreciated by those skilled in the art that the block diagrams presented herein represent conceptual views of illustrative circuitry embodying the present principles. Similarly, it will be appreciated that any flow charts, flow diagrams, state transition diagrams, pseudocode, and the like represent various processes which may be substantially represented in computer readable media and so executed by a computer or processor, whether or not such computer or processor is explicitly shown.

In the claims hereof, any element expressed as a means for performing a specified function is intended to encompass any way of performing that function including, for example, a) a combination of circuit elements that performs that function or b) software in any form, including, therefore, firmware, microcode or the like, combined with appropriate circuitry for executing that software to perform the function. The present principles as defined by such claims reside in the fact that the functionalities provided by the various recited means are combined and brought together in the manner which the claims call for. It is thus regarded that any means that can provide those functionalities are equivalent to those shown herein.

Claim 1:
A method for coding a block of transform coefficients, comprising:
transforming a block of a first number of image values using a partial transform transforming the block of image values into a block of a second number of transform coefficients, the second number being less than the first number; and being representative of a size of the partial transform; and,
entropy coding two coordinates, x and y, defining a position in the block of transform coefficients of a last non-zero transform coefficient determined by a scanning of the transformed coefficients,
wherein the entropy coding of a first coordinate y of said two coordinates comprises splitting each of the two coordinates into a prefix and a suffix; and, depends on the size of the partial transform in that a range of potential y coordinate candidate values is reduced, compared to an initial range of y coordinate candidate values used when a full transform is applied, by considering the size of the partial transform.