CODING OF SIGNIFICANCE MAPS AND TRANSFORM COEFFICIENT BLOCKS
A higher coding efficiency for coding a significance map indicating positions of significant transform coefficients within a transform coefficient block is achieved by the scan order by which the sequentially extracted syntax elements indicating, for associated positions within the transform coefficient block, as to whether at the respective position a significant or insignificant transform coefficient is situated, are sequentially associated to the positions of the transform coefficient block, among the positions of the transform coefficient block depends on the positions of the significant transform coefficients indicated by previously associated syntax elements. Alternatively, the firsttype elements may be contextadaptively entropy decoded using contexts which are individually selected for each of the syntax elements dependent on a number of significant transform coefficients in a neighborhood of the respective syntax element, indicated as being significant by any of the preceding syntax elements.
This application is a Continuation Application of U.S. patent application Ser. No. 15/972,372, filed May 7, 2018, which is a Continuation Application of U.S. patent application Ser. No. 15/200,300, filed Jul. 1, 2016, now U.S. Pat. No. 9,998,741, which is a Continuation of U.S. patent application Ser. No. 13/648,538, filed Oct. 10, 2012, now U.S. Pat. No. 9,894,368, which is a Continuation of International Application No. PCT/EP2011/055644, filed Apr. 11, 2011, and additionally claims priority to European Patent Application No. EP 10159766.4, filed Apr. 13, 2010 and International Patent Application No. PCT/EP2010/054822, filed Apr. 13, 2010, each of which is incorporated herein by reference in entirety.
BACKGROUND OF THE INVENTIONThe present application is directed to coding of significance maps indicating positions of significant transform coefficients within transform coefficient blocks and the coding of such transform coefficient blocks. Such coding may, for example, be used in picture and video coding, for example.
In conventional video coding, the pictures of a video sequence are usually decomposed into blocks. The blocks or the color components of the blocks are predicted by either motioncompensated prediction or intra prediction. The blocks can have different sizes and can be either quadratic or rectangular. All samples of a block or a color component of a block are predicted using the same set of prediction parameters, such as reference indices (identifying a reference picture in the already coded set of pictures), motion parameters (specifying a measure for the movement of a blocks between a reference picture and the current picture), parameters for specifying the interpolation filter, intra prediction modes, etc. The motion parameters can be represented by displacement vectors with a horizontal and vertical component or by higher order motion parameters such as affine motion parameters consisting of 6 components. It is also possible that more than one set of prediction parameters (such as reference indices and motion parameters) are associated with a single block. In that case, for each set of prediction parameters, a single intermediate prediction signal for the block or the color component of a block is generated, and the final prediction signal is built by a weighted sum of the intermediate prediction signals. The weighting parameters and potentially also a constant offset (which is added to the weighted sum) can either be fixed for a picture, or a reference picture, or a set of reference pictures, or they can be included in the set of prediction parameters for the corresponding block. Similarly, still images are also often decomposed into blocks, and the blocks are predicted by an intra prediction method (which can be a spatial intra prediction method or a simple intra prediction method that predicts the DC component of the block). In a corner case, the prediction signal can also be zero.
The difference between the original blocks or the color components of the original blocks and the corresponding prediction signals, also referred to as the residual signal, is usually transformed and quantized. A twodimensional transform is applied to the residual signal and the resulting transform coefficients are quantized. For this transform coding, the blocks or the color components of the blocks, for which a particular set of prediction parameters has been used, can be further split before applying the transform. The transform blocks can be equal to or smaller than the blocks that are used for prediction. It is also possible that a transform block includes more than one of the blocks that are used for prediction. Different transform blocks in a still image or a picture of a video sequence can have different sizes and the transform blocks can represent quadratic or rectangular blocks.
The resulting quantized transform coefficients, also referred to as transform coefficient levels, are then transmitted using entropy coding techniques. Therefore, a block of transform coefficients levels is usually mapped onto a vector (i.e., an ordered set) of transform coefficient values using a scan, where different scans can be used for different blocks. Often a zigzag scan is used. For blocks that contain only samples of one field of an interlaced frame (these blocks can be blocks in coded fields or field blocks in coded frames), it is also common to use a different scan specifically designed for field blocks. A commonly used entropy coding algorithm for encoding the resulting ordered sequence of transform coefficients is runlevel coding. Usually, a large number of the transform coefficient levels is zero, and a set of successive transform coefficient levels that are equal to zero can be efficiently represented by coding the number of successive transform coefficient levels that are equal to zero (the run). For the remaining (nonzero) transform coefficients, the actual level is coded. There are various alternatives of runlevel codes. The run before a nonzero coefficient and the level of the nonzero transform coefficient can be coded together using a single symbol or code word. Often, special symbols for the endofblock, which is sent after the last nonzero transform coefficient, are included. Or it is possible to first encode the number of nonzero transform coefficient levels, and depending on this number, the levels and runs are coded.
A somewhat different approach is used in the highly efficient CABAC entropy coding in H.264. Here, the coding of transform coefficient levels is split into three steps. In the first step, a binary syntax element coded_block_flag is transmitted for each transform block, which signals whether the transform block contains significant transform coefficient levels (i.e., transform coefficients that are nonzero). If this syntax element indicates that significant transform coefficient levels are present, a binaryvalued significance map is coded, which specifies which of the transform coefficient levels have nonzero values. And then, in a reverse scan order, the values of the nonzero transform coefficient levels are coded. The significance map is coded as follows. For each coefficient in the scan order, a binary syntax element significant_coeff_flag is coded, which specifies whether the corresponding transform coefficient level is not equal to zero. If the significant_coeff_flag bin is equal to one, i.e., if a nonzero transform coefficient level exists at this scanning position, a further binary syntax element last_significant_coeff_flag is coded. This bin indicates if the current significant transform coefficient level is the last significant transform coefficient level inside the block or if further significant transform coefficient levels follow in scanning order. If last_significant_coeff_flag indicates that no further significant transform coefficients follow, no further syntax elements are coded for specifying the significance map for the block. In the next step, the values of the significant transform coefficient levels are coded, whose locations inside the block are already determined by the significance map. The values of significant transform coefficient levels are coded in reverse scanning order by using the following three syntax elements. The binary syntax element coeff_abs_greater_one indicates if the absolute value of the significant transform coefficient level is greater than one. If the binary syntax element coeff_abs_greater_one indicates that the absolute value is greater than one, a further syntax element coeff_abs_level_minus_one is sent, which specifies the absolute value of the transform coefficient level minus one. Finally, the binary syntax element coeff_sign_flag, which specifies the sign of the transform coefficient value, is coded for each significant transform coefficient level. It should be noted again that the syntax elements that are related to the significance map are coded in scanning order, whereas the syntax elements that are related to the actual values of the transform coefficients levels are coded in reverse scanning order allowing the usage of more suitable context models.
In the CABAC entropy coding in H.264, all syntax elements for the transform coefficient levels are coded using a binary probability modelling. The nonbinary syntax element coeff_abs_level_minus_one is first binarized, i.e., it is mapped onto a sequence of binary decisions (bins), and these bins are sequentially coded. The binary syntax elements significant_coeff_flag, last_significant_coeff_flag, coeff_abs_greater_one, and coeff_sign_flag are directly coded. Each coded bin (including the binary syntax elements) is associated with a context. A context represents a probability model for a class of coded bins. A measure related to the probability for one of the two possible bin values is estimated for each context based on the values of the bins that have been already coded with the corresponding context. For several bins related to the transform coding, the context that is used for coding is selected based on already transmitted syntax elements or based on the position inside a block.
The significance map specifies information about the significance (transform coefficient level is different from zero) for the scan positions. In the CABAC entropy coding of H.264, for a block size of 4×4, a separate context is used for each scan position for coding the binary syntax elements significant_coeff_flag and the last_significant_coeff_flag, where different contexts are used for the significant_coeff_flag and the last_significant_coeff_flag of a scan position. For 8×8 blocks, the same context model is used for four successive scan positions, resulting in 16 context models for the significant_coeff_flag and additional 16 context models for the last_significant_coeff_flag.
This method of context modelling for the significant_coeff_flag and the last_significant_coeff_flag has some disadvantages for large block sizes. On the one hand side, if each scan position is associated with a separate context model, the number of context models does significantly increase when blocks greater than 8×8 are coded. Such an increased number of context models results in a slow adaptation of the probability estimates and usually an inaccuracy of the probability estimates, where both aspects have a negative impact on the coding efficiency. On the other hand, the assignment of a context model to a number of successive scan positions (as done for 8×8 blocks in H.264) is also not optimal for larger block sizes, since the nonzero transform coefficients are usually concentrated in particular regions of a transform block (the regions are dependent on the main structures inside the corresponding blocks of the residual signal).
After coding the significance map, the block is processed in reverse scan order. If a scan position is significant, i.e., the coefficient is different from zero, the binary syntax element coeff_abs_greater_one is transmitted. Initially, the second context model of the corresponding context model set is selected for the coeff_abs_greater_one syntax element. If the coded value of any coeff_abs_greater_one syntax element inside the block is equal to one (i.e., the absolute coefficient is greater than 2), the context modelling switches back to the first context model of the set and uses this context model up to the end of the block. Otherwise (all coded values of coeff_abs_greater_one inside the block are zero and the corresponding absolute coefficient levels are equal to one), the context model is chosen depending on the number of the coeff_abs_greater_one syntax elements equal to zero that have already been coded/decoded in the reverse scan of the considered block. The context model selection for the syntax element coeff_abs_greater_one can be summarized by the following equation, where the current context model index C_{t}+1 is selected based on the previous context model index C_{t }and the value of the previously coded syntax element coeff_abs_greater_one, which is represented by bin_{t }in the equation. For the first syntax element coeff_abs_greater_one inside a block, the context model index is set equal to C_{t}=1.
The second syntax element for coding the absolute transform coefficient levels, coeff_abs_level_minus_one is only coded, when the coeff_abs_greater_one syntax element for the same scan position is equal to one. The nonbinary syntax element coeff_abs_level_minus_one is binarized into a sequence of bins and for the first bin of this binarization; a context model index is selected as described in the following. The remaining bins of the binarization are coded with fixed contexts. The context for the first bin of the binarization is selected as follows. For the first coeff_abs_level_minus_one syntax element, the first context model of the set of context models for the first bin of the coeff_abs_level_minus_one syntax element is selected, the corresponding context model index is set equal to C_{t}=0. For each further first bin of the coeff_abs_level_minus_one syntax element, the context modelling switches to the next context model in the set, where the number of context models in set is limited to 5. The context model selection can be expressed by the following formula, where the current context model index C_{t+1 }is selected based on the previous context model index C_{t}. As mentioned above, for the first syntax element coeff_abs_level_minus_one inside a block, the context model index is set equal to C_{t}=0. Note, that different sets of context models are used for the syntax elements coeff_abs_greater_one and coeff_abs_level_minus_one.
C_{l+1}(C_{t})=min(C_{t}+1,4)
For large blocks, this method has some disadvantages. The selection of the first context model for coeff_abs_greater_one (which is used if a value of coeff_abs_greater_one equal to 1 has been coded for the blocks) is usually done too early and the last context model for coeff_abs_level_minus_one is reached too fast because the number of significant coefficients is larger than in small blocks. So, most bins of coeff_abs_greater_one and coeff_abs_level_minus_one are coded with a single context model. But these bins usually have different probabilities, and hence the usage of a single context model for a large number of bins has a negative impact on the coding efficiency.
Although, in general, large blocks increase the computational overhead for performing the spectral decomposing transform, the ability to effectively code both small and large blocks would enable the achievement of better coding efficiency in coding sample arrays such as pictures or sample arrays representing other spatially sampled information signals such as depth maps or the like. The reason for this is the dependency between spatial and spectral resolution when transforming a sample array within blocks: the larger the blocks the higher the spectral resolution of the transform is. Generally, it would be favorable to be able to locally apply the individual transform on a sample array such that within the area of such an individual transform, the spectral composition of the sample array does not vary to a great extent. To small blocks guarantee that the content within the blocks is relatively consistent. On the other hand, if the blocks are too small, the spectral resolution is low, and the ratio between nonsignificant and significant transform coefficients gets lower.
Thus, it would be favorable to have a coding scheme which enables an efficient coding for transform coefficient blocks, even when they are large, and their significance maps.
SUMMARYAccording to an embodiment, an apparatus for decoding a significance map indicating positions of significant transform coefficients within a transform coefficient block from a data stream may have a decoder configured to sequentially extract firsttype syntax elements from the data stream, the firsttype syntax elements indicating, for associated positions within the transform coefficient block, at least, as to whether at the respective position a significant or insignificant transform coefficient is situated; and an associator configured to sequentially associate the sequentially extracted firsttype syntax elements to the positions of the transform coefficient block in a scan order among the positions of the transform coefficient block, which depends on the positions of the significant transform coefficients indicated by previously extracted and associated firsttype syntax elements.
According to another embodiment, an apparatus for decoding a significance map indicating positions of significant transform coefficients within a transform coefficient block from a data stream may have an decoder configured to extract a significance map indicating positions of significant transform coefficients within the transform coefficient block, and then the values of the significant transform coefficients within the transform coefficient block from a data stream, with, in extracting the significance map, sequentially extracting firsttype syntax elements from the data stream by contextadaptive entropy decoding, the firsttype syntax elements indicating, for associated positions within the transform coefficient block as to whether at the respective position a significant or insignificant transform coefficient is situated; and an associator configured to sequentially associate the sequentially extracted firsttype syntax elements to the positions of the transform coefficient block in a predetermined scan order among the positions of the transform coefficient block, wherein the decoder is configured to use, in contextadaptively entropy decoding the firsttype syntax elements, contexts which are individually selected for each of the firsttype syntax elements depending on a number of positions at which according to the previously extracted and associated firsttype syntax elements significant transform coefficients are situated, in a neighborhood of the position with which a current firsttype syntax element is associated.
According to another embodiment, an apparatus for decoding a transform coefficient block may have a decoder configured to extract a significance map indicating positions of significant transform coefficients within the transform coefficient block, and then the values of the significant transform coefficients within the transform coefficient block from a data stream, with, in extracting the values of the significant transform coefficients, sequentially extracting the values by contextadaptive entropy decoding; and an associator configured to sequentially associate the sequentially extracted values with the positions of the significant transform coefficients in a predetermined coefficient scan order among the positions of the transform coefficient block, according to which the transform coefficient block is scanned in subblocks of the transform coefficient block using a subblock scan order with, subsidiary, scanning the positions of the transform coefficients within the subblocks in a position subscan order, wherein the decoder is configured to use, in sequentially contextadapted entropy decoding the values of the significant transform coefficient values, a selected set of a number of contexts from a plurality of sets of a number of contexts, the selection of the selected set being performed for each subblock depending on the values of the transform coefficients within a subblock of the transform coefficient block, already having been traversed in the subblock scan order, or the values of the transform coefficients of a colocated subblock in an equally sized previously decoded transform coefficient block.
According to another embodiment, a transformbased decoder configured to decode a transform coefficient block using an apparatus decoding a significance map indicating positions of significant transform coefficients within a transform coefficient block from a data stream may have an decoder configured to sequentially extract firsttype syntax elements from the data stream, the firsttype syntax elements indicating, for associated positions within the transform coefficient block, at least, as to whether at the respective position a significant or insignificant transform coefficient is situated; and an associator configured to sequentially associate the sequentially extracted firsttype syntax elements to the positions of the transform coefficient block in a scan order among the positions of the transform coefficient block, which depends on the positions of the significant transform coefficients indicated by previously extracted and associated firsttype syntax elements, and to perform a transform from spectral domain to spatial domain to the transform coefficient block.
According to another embodiment, a transformbased decoder configured to decode a transform coefficient block using an apparatus for decoding a significance map indicating positions of significant transform coefficients within a transform coefficient block from a data stream may have an decoder configured to extract a significance map indicating positions of significant transform coefficients within the transform coefficient block, and then the values of the significant transform coefficients within the transform coefficient block from a data stream, with, in extracting the significance map, sequentially extracting firsttype syntax elements from the data stream by contextadaptive entropy decoding, the firsttype syntax elements indicating, for associated positions within the transform coefficient block as to whether at the respective position a significant or insignificant transform coefficient is situated; and an associator configured to sequentially associate the sequentially extracted firsttype syntax elements to the positions of the transform coefficient block in a predetermined scan order among the positions of the transform coefficient block, wherein the decoder is configured to use, in contextadaptively entropy decoding the firsttype syntax elements, contexts which are individually selected for each of the firsttype syntax elements depending on a number of positions at which according to the previously extracted and associated firsttype syntax elements significant transform coefficients are situated, in a neighborhood of the position with which a current firsttype syntax element is associated, and to perform a transform from spectral domain to spatial domain to the transform coefficient block.
According to another embodiment, a predictive decoder may have a transformbased decoder configured to decode a transform coefficient block using an apparatus for decoding a significance map indicating positions of significant transform coefficients within a transform coefficient block from a data stream, wherein the apparatus may have an decoder configured to sequentially extract firsttype syntax elements from the data stream, the firsttype syntax elements indicating, for associated positions within the transform coefficient block, at least, as to whether at the respective position a significant or insignificant transform coefficient is situated; and an associator configured to sequentially associate the sequentially extracted firsttype syntax elements to the positions of the transform coefficient block in a scan order among the positions of the transform coefficient block, which depends on the positions of the significant transform coefficients indicated by previously extracted and associated firsttype syntax elements, and to perform a transform from spectral domain to spatial domain to the transform coefficient block to obtain a residual block; a predictor configured to provide a prediction for a block of an array of information samples representing an spatially sampled information signal; and a combiner configured to combine the prediction of the block and the residual block to reconstruct the array of information samples.
According to another embodiment, a predictive decoder may have a transformbased decoder configured to decode a transform coefficient block using an apparatus for decoding a significance map indicating positions of significant transform coefficients within a transform coefficient block from a data stream which may have an decoder configured to extract a significance map indicating positions of significant transform coefficients within the transform coefficient block, and then the values of the significant transform coefficients within the transform coefficient block from a data stream, with, in extracting the significance map, sequentially extracting firsttype syntax elements from the data stream by contextadaptive entropy decoding, the firsttype syntax elements indicating, for associated positions within the transform coefficient block as to whether at the respective position a significant or insignificant transform coefficient is situated; and an associator configured to sequentially associate the sequentially extracted firsttype syntax elements to the positions of the transform coefficient block in a predetermined scan order among the positions of the transform coefficient block, wherein the decoder is configured to use, in contextadaptively entropy decoding the firsttype syntax elements, contexts which are individually selected for each of the firsttype syntax elements depending on a number of positions at which according to the previously extracted and associated firsttype syntax elements significant transform coefficients are situated, in a neighborhood of the position with which a current firsttype syntax element is associated, and to perform a transform from spectral domain to spatial domain to the transform coefficient block to obtain a residual block; a predictor configured to provide a prediction for a block of an array of information samples representing an spatially sampled information signal; and a combiner configured to combine the prediction of the block and the residual block to reconstruct the array of information samples.
Another embodiment may have an apparatus for encoding a significance map indicating positions of significant transform coefficients within a transform coefficient block into a data stream, the apparatus being configured to sequentially code firsttype syntax elements into the data stream by entropy encoding, the firsttype syntax elements indicating, for associated positions within the transform coefficient block, at least, as to whether at the respective position a significant or insignificant transform coefficient is situated, wherein the apparatus is further configured to the firsttype syntax elements into the data stream at a scan order among the positions of the transform coefficient block, which depends on the positions of the significant transform coefficients indicated by previously coded firsttype syntax elements.
Another embodiment may have an apparatus for encoding a significance map indicating positions of significant transform coefficients within a transform coefficient block into a data stream, the apparatus being configured to code a significance map indicating positions of significant transform coefficients within the transform coefficient block, and then the values of the significant transform coefficients within the transform coefficient block into the data stream, with, in coding the significance map, sequentially coding firsttype syntax elements into the data stream by contextadaptive entropy encoding, the firsttype syntax elements indicating, for associated positions within the transform coefficient block as to whether at the respective position a significant or insignificant transform coefficient is situated, wherein the apparatus is further configured to sequentially code the firsttype syntax elements into the data stream in a predetermined scan order among the positions of the transform coefficient block, wherein the apparatus is configured to use, in contextadaptively entropy encoding each of the firsttype syntax elements, contexts which are individually selected for the firsttype syntax elements depending on a number of positions at which significant transform coefficients are situated and with which the previously coded firsttype syntax elements are associated, in a neighborhood of the position with which a current firsttype syntax element is associated.
Another embodiment may have an apparatus for encoding a transform coefficient block, configured to code a significance map indicating positions of significant transform coefficients within the transform coefficient block, and then the values of the significant transform coefficients within the transform coefficient block into a data stream, with, in extracting the values of the significant transform coefficients, sequentially coding the values by contextadaptive entropy encoding, wherein the apparatus is configured to code the values into the data stream in a predetermined coefficient scan order among the positions of the transform coefficient block, according to which the transform coefficient block is scanned in subblocks of the transform coefficient block using a subblock scan order with, subsidiary, scanning the positions of the transform coefficients within the subblocks in a position subscan order, wherein the apparatus is further configured to use, in sequentially contextadapted entropy encoding the values of the significant transform coefficient values, a selected set of a number of contexts from a plurality of sets of a number of contexts, the selection of the selected set being performed for each subblock depending on the values of the transform coefficients within a subblock of the transform coefficient block, already having been traversed in the subblock scan order, or the values of the transform coefficients of a colocated subblock in an equally sized previously encoded transform coefficient block.
According to another embodiment, a method for decoding a significance map indicating positions of significant transform coefficients within a transform coefficient block from a data stream may have the steps of sequentially extracting firsttype syntax elements from the data stream, the firsttype syntax elements indicating, for associated positions within the transform coefficient block, at least, as to whether at the respective position a significant or insignificant transform coefficient is situated; and sequentially associating the sequentially extracted firsttype syntax elements to the positions of the transform coefficient block in a scan order among the positions of the transform coefficient block, which depends on the positions of the significant transform coefficients indicated by previously extracted and associated firsttype syntax elements.
According to another embodiment, a method for decoding a significance map indicating positions of significant transform coefficients within a transform coefficient block from a data stream may have the steps of extracting a significance map indicating positions of significant transform coefficients within the transform coefficient block, and then the values of the significant transform coefficients within the transform coefficient block from a data stream, with, in extracting the significance map, sequentially extracting firsttype syntax elements from the data stream by contextadaptive entropy decoding, the firsttype syntax elements indicating, for associated positions within the transform coefficient block as to whether at the respective position a significant or insignificant transform coefficient is situated; and sequentially associating the sequentially extracted firsttype syntax elements to the positions of the transform coefficient block in a predetermined scan order among the positions of the transform coefficient block, wherein, in contextadaptively entropy decoding the firsttype syntax elements, contexts are used which are individually selected for each of the firsttype syntax elements depending on a number of positions at which according to the previously extracted and associated firsttype syntax elements significant transform coefficients are situated, in a neighborhood of the position with which a current firsttype syntax element is associated.
According to another embodiment, a method for decoding a transform coefficient block may have the steps of extracting a significance map indicating positions of significant transform coefficients within the transform coefficient block, and then the values of the significant transform coefficients within the transform coefficient block from a data stream, with, in extracting the values of the significant transform coefficients, sequentially extracting the values by contextadaptive entropy decoding; and sequentially associating the sequentially extracted values with the positions of the significant transform coefficients in a predetermined coefficient scan order among the positions of the transform coefficient block, according to which the transform coefficient block is scanned in subblocks of the transform coefficient block using a subblock scan order with, subsidiary, scanning the positions of the transform coefficients within the subblocks in a position subscan order, wherein, in sequentially contextadapted entropy decoding the values of the significant transform coefficient values, a selected set of a number of contexts from a plurality of sets of a number of contexts is used, the selection of the selected set being performed for each subblock depending on the values of the transform coefficients within a subblock of the transform coefficient block, already having been traversed in the subblock scan order, or the values of the transform coefficients of a colocated subblock in an equally sized previously decoded transform coefficient block.
According to another embodiment, a method for encoding a significance map indicating positions of significant transform coefficients within a transform coefficient block into a data stream may have the steps of sequentially coding firsttype syntax elements into the data stream by entropy encoding, the firsttype syntax elements indicating, for associated positions within the transform coefficient block, at least, as to whether at the respective position a significant or insignificant transform coefficient is situated, with coding the firsttype syntax elements into the data stream at a scan order among the positions of the transform coefficient block, which depends on the positions of the significant transform coefficients indicated by previously coded firsttype syntax elements.
According to another embodiment, a method for encoding a significance map indicating positions of significant transform coefficients within a transform coefficient block into a data stream may have the steps of coding a significance map indicating positions of significant transform coefficients within the transform coefficient block, and then the values of the significant transform coefficients within the transform coefficient block into the data stream, with, in coding the significance map, sequentially coding firsttype syntax elements into the data stream by contextadaptive entropy encoding, the firsttype syntax elements indicating, for associated positions within the transform coefficient block as to whether at the respective position a significant or insignificant transform coefficient is situated, wherein the sequentially coding the firsttype syntax elements into the data stream is performed in a predetermined scan order among the positions of the transform coefficient block, and in contextadaptively entropy encoding each of the firsttype syntax elements, contexts are used which are individually selected for the firsttype syntax elements depending on a number of positions at which significant transform coefficients are situated and with which the previously coded firsttype syntax elements are associated, in a neighborhood of the position with which a current firsttype syntax element is associated.
According to another embodiment, a method for encoding a transform coefficient block may have the steps of coding a significance map indicating positions of significant transform coefficients within the transform coefficient block, and then the values of the significant transform coefficients within the transform coefficient block into a data stream, with, in coding the values of the significant transform coefficients, sequentially coding the values by contextadaptive entropy encoding, wherein the coding the values into the data stream is performed in a predetermined coefficient scan order among the positions of the transform coefficient block, according to which the transform coefficient block is scanned in subblocks of the transform coefficient block using a subblock scan order with, subsidiary, scanning the positions of the transform coefficients within the subblocks in a position subscan order, wherein in sequentially contextadapted entropy encoding the values of the significant transform coefficient values, a selected set of a number of contexts from a plurality of sets of a number of contexts is used, the selection of the selected set being performed for each subblock depending on the values of the transform coefficients within a subblock of the transform coefficient block, already having been traversed in the subblock scan order, or the values of the transform coefficients of a colocated subblock in an equally sized previously encoded transform coefficient block.
Another embodiment may be a data stream having encoded therein a significance map indicating positions of significant transform coefficients within a transform coefficient block, wherein firsttype syntax elements are sequentially coded into the data stream by entropy encoding, the firsttype syntax elements indicating, for associated positions within the transform coefficient block, at least, as to whether at the respective position a significant or insignificant transform coefficient is situated, wherein the firsttype syntax elements are coded into the data stream at a scan order among the positions of the transform coefficient block, which depends on the positions of the significant transform coefficients indicated by previously coded firsttype syntax elements.
Another embodiment may be a data stream having encoded therein significance map indicating positions of significant transform coefficients within a transform coefficient block, wherein a significance map indicating positions of significant transform coefficients within the transform coefficient block, followed by the values of the significant transform coefficients within the transform coefficient block are coded into the data stream, wherein, within the significance map, the firsttype syntax elements are sequentially codes into the data stream by contextadaptive entropy encoding, the firsttype syntax elements indicating, for associated positions within the transform coefficient block as to whether at the respective position a significant or insignificant transform coefficient is situated, wherein the firsttype syntax elements are sequentially coding into the data stream in a predetermined scan order among the positions of the transform coefficient block, and the firsttype syntax elements are contextadaptively entropy encoded into the data stream using contexts which are individually selected for the firsttype syntax elements depending on a number of positions at which significant transform coefficients are situated and with which the preceding firsttype syntax elements coded into the data stream are associated, in a neighborhood of the position with which a current firsttype syntax element is associated.
Another embodiment may be a data stream having encoded a coding of a significance map indicating positions of significant transform coefficients within the transform coefficient block, followed by the values of the significant transform coefficients within the transform coefficient block, wherein the values of the significant transform coefficients are sequentially coded into the data stream by contextadaptive entropy encoding in a predetermined coefficient scan order among the positions of the transform coefficient block, according to which the transform coefficient block is scanned in subblocks of the transform coefficient block using a subblock scan order with, subsidiary, scanning the positions of the transform coefficients within the subblocks in a position subscan order, wherein the values of the significant transform coefficient values are sequentially contextadapted entropy encoded into the data stream using a selected set of a number of contexts from a plurality of sets of a number of contexts, the selection of the selected set being performed for each subblock depending on the values of the transform coefficients within a subblock of the transform coefficient block, already having been traversed in the subblock scan order, or the values of the transform coefficients of a colocated subblock in an equally sized previously encoded transform coefficient block.
Another embodiment may be a computer readable digital storage medium having stored thereon a computer program having a program code for performing, when running on a computer, a method for decoding a significance map indicating positions of significant transform coefficients within a transform coefficient block from a data stream having the steps of extracting a significance map indicating positions of significant transform coefficients within the transform coefficient block, and then the values of the significant transform coefficients within the transform coefficient block from a data stream, with, in extracting the significance map, sequentially extracting firsttype syntax elements from the data stream by contextadaptive entropy decoding, the firsttype syntax elements indicating, for associated positions within the transform coefficient block as to whether at the respective position a significant or insignificant transform coefficient is situated; and sequentially associating the sequentially extracted firsttype syntax elements to the positions of the transform coefficient block in a predetermined scan order among the positions of the transform coefficient block, wherein, in contextadaptively entropy decoding the firsttype syntax elements, contexts are used which are individually selected for each of the firsttype syntax elements depending on a number of positions at which according to the previously extracted and associated firsttype syntax elements significant transform coefficients are situated, in a neighborhood of the position with which a current firsttype syntax element is associated.
Another embodiment may be a computer readable digital storage medium having stored thereon a computer program having a program code for performing, when running on a computer, a method for decoding a transform coefficient block, which may have the steps of extracting a significance map indicating positions of significant transform coefficients within the transform coefficient block, and then the values of the significant transform coefficients within the transform coefficient block from a data stream, with, in extracting the values of the significant transform coefficients, sequentially extracting the values by contextadaptive entropy decoding; and sequentially associating the sequentially extracted values with the positions of the significant transform coefficients in a predetermined coefficient scan order among the positions of the transform coefficient block, according to which the transform coefficient block is scanned in subblocks of the transform coefficient block using a subblock scan order with, subsidiary, scanning the positions of the transform coefficients within the subblocks in a position subscan order, wherein, in sequentially contextadapted entropy decoding the values of the significant transform coefficient values, a selected set of a number of contexts from a plurality of sets of a number of contexts is used, the selection of the selected set being performed for each subblock depending on the values of the transform coefficients within a subblock of the transform coefficient block, already having been traversed in the subblock scan order, or the values of the transform coefficients of a colocated subblock in an equally sized previously decoded transform coefficient block.
Another embodiment may be a computer readable digital storage medium having stored thereon a computer program having a program code for performing, when running on a computer, a method for encoding a significance map indicating positions of significant transform coefficients within a transform coefficient block into a data stream, which may have the steps of sequentially coding firsttype syntax elements into the data stream by entropy encoding, the firsttype syntax elements indicating, for associated positions within the transform coefficient block, at least, as to whether at the respective position a significant or insignificant transform coefficient is situated, with coding the firsttype syntax elements into the data stream at a scan order among the positions of the transform coefficient block, which depends on the positions of the significant transform coefficients indicated by previously coded firsttype syntax elements.
In accordance with a first aspect of the present application, an underlying idea of the present application is that a higher coding efficiency for coding a significance map indicating positions of significant transform coefficients within a transform coefficient block may be achieved if the scan order by which the sequentially extracted syntax elements indicating, for associated positions within the transform coefficient block, as to whether at the respective position a significant or insignificant transform coefficient is situated, are sequentially associated to the positions of the transform coefficient block, among the positions of the transform coefficient block depends on the positions of the significant transform coefficients indicated by previously associated syntax elements. In particular, the inventors found out that in typical sample array content such as picture, video or depth map content, the significant transform coefficients mostly form clusters at a certain side of the transform coefficient block corresponding to either nonzero frequencies in the vertical and low frequencies in the horizontal direction or vice versa so that taking into account the positions of significant transform coefficients indicated by previously associated syntax elements enables to control the further cause of the scan such that the probability of reaching the last significant transform coefficient within the transform coefficient block earlier is increased relative to a procedure according to which the scan order is predetermined independent from the positions of the significant transform coefficients indicated by previously associated syntax elements so far. This is particularly true for larger blocks, although the just said is also true for small blocks.
In accordance with an embodiment of the present application, the entropy decoder is configured to extract from the data stream information enabling to recognize as to whether a significant transform coefficient currently indicated by a currently associated syntax element is the last significant transform coefficient independent from its exact position within the transform coefficient block wherein the entropy decoder is configured to expect no further syntax element in case of the current syntax element relating to such last significant transform coefficient. This information may comprise the number of significant transform coefficients within the block. Alternatively, second syntax elements are interleaved with the first syntax elements, the second syntax elements indicating, for associated positions at which a significant transform coefficient is situated, as to whether same is the last transform coefficient in the transform coefficient block or not.
In accordance with an embodiment, the associator adapts the scan order depending on the positions of the significant transform coefficients indicated so far merely at predefined positions within the transform coefficient block. For example, several subpaths which traverse mutually disjointed subsets of positions within the transform coefficient block extend substantially diagonally from one pair of sides of the transform coefficient block corresponding to minimum frequency along a first direction and highest frequency along the other direction, respectively, to an opposite pair of sides of the transform coefficient block corresponding to zero frequency along the second direction and maximum frequency along the first direction, respectively. In this case the associator is configured to select the scan order such that the subpaths are traversed in an order among the subpaths where the distance of the subpaths to the DC position within the transform coefficient block monotonically increases, each subpath is traversed without interrupt along run direction, and for each subpath the direction along which the subpath is traversed is selected by the associator depending on the positions of the significant transform coefficients having been traversed during the previous subpaths. By this measure, the probability is increased that the last subpath, where the last significant transform coefficient is situated, is traversed in a direction so that it is more probable that the last significant transform coefficient lies within the first half of this last subpath than within the second half thereof, thereby enabling to reduce the number of syntax elements indicating as to whether at a respective position a significant or insignificant transform coefficient is situated. The effect is especially valuable in case of large transform coefficient blocks.
According to a further aspect of the present application, the present application is based on the finding that a significance map indicating positions of significant transform coefficients within a transform coefficient block may be coded more efficiently if the aforementioned syntax elements indicating, for associated positions within the transform coefficient block as to whether at the respective position a significant or insignificant transform coefficient is situated, are contextadaptively entropy decoded using contexts which are individually selected for each of the syntax elements dependent on a number of significant transform coefficients in a neighborhood of the respective syntax element, indicated as being significant by any of the preceding syntax elements. In particular, the inventors found out that with increasing size of the transform coefficient blocks, the significant transform coefficients are somehow clustered at certain areas within the transform coefficient block so that a context adaptation which is not only sensitive to the number of significant transform coefficients having been traversed in the predetermined scan orders so far but also takes into account the neighborhood of the significant transform coefficients results in a better adaptation of the context and therefore increases the coding efficiency of the entropy coding. Of course, both of the aboveoutlined aspects may be combined in a favourable way.
Further, in accordance with an even further aspect of the present application, the application is based on the finding that the coding efficiency for coding a transform coefficient block may be increased when a significance map indicating positions of the significant transform coefficients within the transform coefficient block precedes the coding of the actual values of the significant transform coefficients within the transform coefficient block and if the predetermined scan order among the positions of the transform coefficient block used to sequentially associate the sequence of values of the significant transform coefficients with the positions of the significant transform coefficients scans the transform coefficient block in subblocks using a subblock scan order among the subblocks with, subsidiary, scanning the positions of the transform coefficients within the subblocks in a coefficients scan order, and if a selected set of a number of contexts from a plurality of sets of a number of context is used for sequentially context adaptively entropy decoding the values of the significant transform coefficient values, the selection of the selected set depending on the values of the transform coefficients within a subblock of the transform coefficient block already having been traversed in the subblock scan order or the values of the transform coefficients of a colocated subblock in a previously decoded transform coefficient block. This way the context adaptation is very well suited to the aboveoutlined property of significant transform coefficients being clustered at certain areas within a transform coefficient block, especially when large transform coefficient blocks are considered. In other words, the values may be scanned in subblocks, and contexts selected based on subblock statistics.
Again, even the latter aspect may be combined with any of the previously identified aspects of the present application or with both aspects.
Embodiments of the present application are described in the following with respect to the Figures among which
It is noted that during the description of the figures, elements occurring in several of these Figures are indicated with the same reference sign in each of these Figures and a repeated description of these elements as far as the functionality is concerned is avoided in order to avoid unnecessary repetitions. Nevertheless, the functionalities and descriptions provided with respect to one figure shall also apply to other Figures unless the opposite is explicitly indicated.
The encoder 10 is a blockbased encoder. That is, encoder 10 encodes the sample array 20 into the data stream 30 in units of blocks 40. The encoding in units of blocks 40 does not necessarily mean that encoder 10 encodes these blocks 40 totally independent from each other. Rather, encoder 10 may use reconstructions of previously encoded blocks in order to extrapolate or intrapredict remaining blocks, and may use the granularity of the blocks for setting coding parameters, i.e. for setting the way each sample array region corresponding to a respective block is coded.
Further, encoder 10 is a transform coder. That is, encoder 10 encodes blocks 40 by using a transform in order to transfer the information samples within each block 40 from spatial domain into spectral domain. A twodimensional transform such as a DCT of FFT or the like may be used. Advantageously, the blocks 40 are of quadratic shape or rectangular shape.
The subdivision of the sample array 20 into blocks 40 shown in
However, several alternatives are possible. For example, the blocks may overlap each other. The overlapping may, however, be restricted to such an extent that each block has a portion not overlapped by any neighbouring block, or such that each sample of the blocks is overlapped by, at the maximum, one block among the neighbouring blocks arranged in juxtaposition to the current block along a predetermined direction. That latter would mean that the left and right hand neighbor blocks may overlap the current block so as to fully cover the current block but they may not overlay each other, and the same applies for the neighbors in vertical and diagonal direction.
As a further alternative, the subdivision of sample array 20 into blocks 40 may be adapted to the content of the sample array 20 by the encoder 10 with the subdivision information on the subdivision used being transferred to the decoder side via bitstream 30.
Instead of a quadtreebased subdivision a more general multi treebased subdivision may be used and the number of child nodes per hierarchy level may differ between different hierarchy levels.
Encoder 10 and decoder 50 may be configured to perform entropy encoding/decoding in order to insert the information on the transform coefficient blocks into, and extract this information from the data stream, respectively. Details in this regard are described later. It should be noted that the data stream 30 not necessarily comprises information on transform coefficient blocks for all the blocks 40 of the sample array 20. Rather, as subset of blocks 40 may be coded into the bitstream 30 in another way. For example, encoder 10 may decide to refrain from inserting a transform coefficient block for a certain block of blocks 40 with inserting into the bitstream 30 alternative coding parameters instead which enable the decoder 50 to predict or otherwise fill the respective block in the reconstructed version 60. For example, encoder 10 may perform a texture analysis in order to locate blocks within sample array 20 which may be filled at the decoder side by decoder by way of texture synthesis and indicate this within the bitstream accordingly.
As discussed in the following Figures, the transform coefficient blocks not necessarily represent a spectral domain representation of the original information samples of a respective block 40 of the sample array 20. Rather, such a transform coefficient block may represent a spectral domain representation of a prediction residual of the respective block 40.
The coder of
That is, in accordance with the embodiment of
It should be noted that several alternatives exist for the embodiment of
It should be noted that in the abovedescribed embodiments, the spatial granularity at which the prediction and the transformation of the residual is performed, do not have to be equal to each other. This is shown in
The above embodiments have in common that a block of (residual or original) samples is to be transformed at the encoder side into a transform coefficient block which, in turn, is to be inverse transformed into a reconstructed block of samples at the decoder side. This is illustrated in
As already noted above, it may be seen from
Accordingly, according to an embodiment of the present application, an apparatus for decoding such a significance map from the data stream or for decoding the significance map along the corresponding significant transform coefficient values from the data stream, may be implemented as shown in
The apparatus of
As map/coefficient entropy decoder 250 sequentially decodes the syntax elements representing the significance map and the significant transform coefficient values, the associator 252 is configured to associate these sequentially decoded syntax elements/values to the positions within the transform block 256. The scan order in which the associator 252 associates the sequentially decoded syntax elements representing the significance map and levels of the significant transform coefficients to the positions of the transform block 256 follows a onedimensional scan order among the positions of the transform block 256 which is identical to the order used at the encoding side to introduce these elements into the data stream. As will also be outlined in more detail below, the scan order for the significance map syntax elements may be equal to the order used for the significant coefficient values, or not.
The map/coefficient entropy decoder 250 may access the information on the transform block 256 available so far, as generated by the associator 252 up to a currently to be decoded syntax element/level, in order to set probability estimation context for entropy decoding the syntax element/level currently to be decoded as indicated by a dashed line 258. For example, associator 252 may log the information gathered so far from the sequentially associated syntax elements such as the levels itself or the information as to whether at the respective position a significant transform coefficient is situated or not or as to whether nothing is known about the respective position of the transform block 256 wherein the map/coefficient entropy decoder 250 accesses this memory. The memory just mentioned is not shown in
The following description concentrates on specific embodiments for coding the transform coefficient blocks or the significance map, which embodiments are readily transferable to the embodiments described above. In these embodiments, a binary syntax element coded_block_flag may be transmitted for each transform block, which signals whether the transform block contains any significant transform coefficient level (i.e., transform coefficients that are nonzero). If this syntax element indicates that significant transform coefficient levels are present, the significance map is coded, i.e. merely then. The significance map specifies, as indicated above, which of the transform coefficient levels have nonzero values. The significance map coding involves a coding of binary syntax elements significant_coeff_flag each specifying for a respectively associated coefficient position whether the corresponding transform coefficient level is not equal to zero. The coding is performed in a certain scan order which may change during the significance map coding dependent on the positions of significant coefficients identified to be significant so far, as will be described in more detail below. Further, the significance map coding involves a coding of binary syntax elements last_significant_coeff_flag interspersed with the sequence of significant_coeff_flag at the positions thereof, where significant_coeff_flag signals a significant coefficient. If the significant_coeff_flag bin is equal to one, i.e., if a nonzero transform coefficient level exists at this scanning position, the further binary syntax element last_significant_coeff_flag is coded. This bin indicates if the current significant transform coefficient level is the last significant transform coefficient level inside the block or if further significant transform coefficient levels follow in scanning order. If last_significant_coeff_flag indicates that no further significant transform coefficients follow, no further syntax elements are coded for specifying the significance map for the block. Alternatively, the number of significant coefficient positions could be signaled within the data stream in advance of the coding of the sequence of significant_coeff_flag. In the next step, the values of the significant transform coefficient levels are coded. As described above, alternatively, the transmission of the levels could be interleaved with the transmission of the significance map. The values of significant transform coefficient levels are coded in a further scanning order for which examples are described below. The following three syntax elements are used. The binary syntax element coeff_abs_greater_one indicates if the absolute value of the significant transform coefficient level is greater than one. If the binary syntax element coeff_abs_greater_one indicates that the absolute value is greater than one, a further syntax element coeff_abs_level_minus_one is sent, which specifies the absolute value of the transform coefficient level minus one. Finally, the binary syntax element coeff_sign_flag, which specifies the sign of the transform coefficient value, is coded for each significant transform coefficient level.
The embodiments described below enable to further reduce the bit rate and thus increase the coding efficiency. In order to do so, these embodiments use a specific approach for context modelling for syntax elements related to the transform coefficients. In particular, a new context model selection for the syntax elements significant_coeff_flag, last_significant_coeff_flag, coeff_abs_greater_one and coeff_abs_level_minus_one is used. And furthermore, an adaptive switching of the scan during the encoding/decoding of the significance map (specifying the locations of nonzero transform coefficient levels) is described. As to the meaning of the mustmentioned syntax elements, reference is made to the above introductory portion of the present application.
The coding of the significant_coeff_flag and the last_significant_coeff_flag syntax elements, which specify the significance map, is improved by an adaptive scan and a new context modelling based on a defined neighborhood of already coded scan positions. These new concepts result in a more efficient coding of significance maps (i.e., a reduction of the corresponding bit rate), in particular for large block sizes.
One aspect of the belowoutlined embodiments is that the scan order (i.e., the mapping of a block of transform coefficient values onto an ordered set (vector) of transform coefficient levels) is adapted during the encoding/decoding of a significance map based on the values of the already encoded/decoded syntax elements for the significance map.
In an embodiment, the scan order is adaptively switched between two or more predefined scan pattern. In an embodiment, the switching can take place only at certain predefined scan positions. In a further embodiment of the invention, the scan order is adaptively switched between two predefined scan patterns. In an embodiment, the switching between the two predefined scan patterns can take place only at certain predefined scan positions.
The advantage of the switching between scan patterns is a reduced bit rate, which is a result of a smaller number of coded syntax elements. As an intuitive example and referring to
 More details for an embodiment of the invention are described below.
As mentioned above, also for large block sizes, it is advantageous to keep the number of context models reasonably small in order to enable a fast adaptation of the context models and providing a high coding efficiency. Hence, a particular context should be used for more than one scan position. But the concept of assigning the same context to a number of successive scan positions, as done for 8×8 blocks in H.264, is usually not suitable, since the significant transform coefficient levels are usually concentrated in certain areas of a transform blocks (this concentration may be a result of certain dominant structures that are usually present in, for example residual blocks). For designing the context selection, one could use the above mentioned observation that significant transform coefficient levels are often concentrated in certain areas of a transform block. In the following, concepts are described by which this observation can be exploited.
In one embodiment, a large transform block (e.g., greater than 8×8) is partitioned into a number of rectangular subblocks (e.g., into 16 subblocks) and each of these subblocks is associated with a separate context model for coding the significant_coeff_flag and last_significant_coeff_flag (where different context models are used for the significant_coeff_flag and last_significant_coeff_flag). The partitioning into subblocks can be different for the significant_coeff_flag and last_significant_coeff_flag. The same context model may be used for all scan positions that are located in a particular subblock.
In a further embodiment, a large transform block (e.g., greater than 8×8) may be partitioned into a number of rectangular and/or nonrectangular subregions and each of these subregions is associated with a separate context model for coding the significant_coeff_flag and/or the last_significant_coeff_flag. The partitioning into subregions can be different for the significant_coeff_flag and last_significant_coeff_flag. The same context model is used for all scan positions that are located in a particular subregion.
In a further embodiment, the context model for coding the significant_coeff_flag and/or the last_significant_coeff_flag is selected based on the already coded symbols in a predefined spatial neighborhood of the current scan position. The predefined neighborhood can be different for different scan positions. In an embodiment, the context model is selected based on the number of significant transform coefficient levels in the predefined spatial neighborhood of the current scan position, where only already coded significance indications are counted.
 More details for an embodiment of the invention are described below.
As mentioned above, for large block sizes, the conventional context modelling encodes a large number of bins (that usually have different probabilities) with one single context model for the coeff_abs_greater_one and coeff_abs_level_minus_one syntax elements. In order to avoid this drawback for large block size, large blocks may, in accordance with an embodiment, be divided into small quadratic or rectangular subblocks of a particular size and a separate context modelling is applied for each subblock. In addition, multiple sets of context models may be used, where one of these context model sets is selected for each subblock based on an analysis of the statistics of previously coded subblocks. In an embodiment invention, the number of transform coefficients greater than 2 (i.e. coeff_abs_level_minus_1>1) in the previously coded subblock of the same block is used to derive the context model set for the current subblock. These enhancements for context modelling of the coeff_abs_greater_one and coeff_abs_level_minus_one syntax elements result in a more efficient coding of both syntax elements, in particular for large block sizes. In an embodiment, the block size of a subblock is 2×2. In another embodiment, the block size of a subblock is 4×4.
In a first step, a block larger than a predefined size may be divided into smaller subblocks of a particular size. The coding process of the absolute transform coefficient levels maps the quadratic or rectangular block of subblocks onto an ordered set (vector) of subblocks using a scan, where different scans can be used for different blocks. In an embodiment, the subblocks are processed using a zigzag scan; the transform coefficient levels inside a subblock are processed in a reverse zigzag scan, i.e. a scan loading from a transform coefficient belonging to the highest frequency in vertical and horizontal direction to the coefficient relating to the lowest frequency in both directions. In another embodiment of the invention, a reversed zigzag scan is used for coding the subblocks and for coding the transform coefficient levels inside the subblocks. In another embodiment of the invention, the same adaptive scan that is used for coding the significance map (see above) is used to process the whole block of transform coefficient levels.
The division of a large transform block into subblocks avoids the problem of using just one context model for most of the bins of a large transform block. Inside the subblocks, the stateoftheart context modelling (as specified in H.264) or a fixed context can be used, depending on the actual size of the subblocks. Additionally, the statistics (in terms of probability modelling) for such subblocks are different from the statistics of a transform block with the same size. This property may be exploited by extending the set of context models for the coeff_abs_greater_one and coeff_abs_level_minus_one syntax elements. Multiple sets of context models can be provided, and for each subblock one of these context model sets may be selected based on the statistics of previously coded subblock in current transform block or in previously coded transform blocks. In an embodiment of the invention, the selected set of context models is derived based on the statistics of the previously coded subblocks in the same block. In another embodiment of the invention, the selected set of context models is derived based on the statistics of the same subblock of previously coded blocks. In an embodiment, the number of context model sets is set equal to 4, while in another embodiment, the number of context model sets is set equal to 16. In an embodiment, the statistics that are used for deriving the context model set is the number of absolute transform coefficient levels greater than 2 in previously coded subblocks. In another embodiment, the statistics that are used for deriving the context model set is the difference between the number of significant coefficients and the number of transform coefficient levels with an absolute value greater than 2.
The coding of the significance map may be performed as outlined below, namely by an adaptive switching of the scan order.
In an embodiment, the scanning order for coding the significance map is adapted by switching between two predefined scan patterns. The switching between the scan patterns can only be done at certain predefined scan positions. The decision whether the scanning pattern is switched depends on the values of the already coded/decoded significance map syntax elements. In an embodiment, both predefined scanning patterns specify scanning patterns with diagonal subscans, similar to the scanning pattern of the zigzag scan. The scan patterns are illustrated in
At the end of each diagonal subscan, it is decided by the associator 252 whether the first or the second of the predefined scanning patterns 300, 302 is used for the next diagonal subscan. This decision is based on the values of the counters c_{1 }and c_{2}. When the counter for the bottomleft part of the transform block is greater than the counter for the bottomleft part, the scanning pattern that scans the diagonal subscans from bottomleft to topright is used; otherwise (the counter for the bottomleft part of the transform block is less than or equal to the counter for the bottomleft part), the scanning pattern that scans the diagonal subscans from topright to bottomleft is used. This decision can be expressed by the following formula:
It should be noted that the above described embodiment of the invention can be easily applied to other scanning patterns. As an example, the scanning pattern that is used for field macroblocks in H.264 can also be decomposed into subscans. In a further embodiment, a given but arbitrary scanning pattern is decomposed into subscans. For each of the subscans, two scanning patterns are defined: one from bottomleft to topright and one from topright to bottomleft (as basic scan direction). In addition, two counters are introduced which count the number of significant coefficients in a first part (close to the bottomleft border of a transform blocks) and a second part (close to the topright border of a transform blocks) inside the subscans. Finally, at the end of each subscan it is decided (based on the values of the counters), whether the next subscan is scanned from bottomleft to topright or from topright to bottomleft.
In the following, embodiments for as to how entropy decoder 250 models the contexts, are presented.
In one embodiment, the context modelling for the significant_coeff_flag is done as follows. For 4×4 blocks, the context modelling is done as specified in H.264. For 8×8 blocks, the transform block is decomposed into 16 subblocks of 2×2 samples, and each of these subblocks is associated with a separate context. Note that this concept can also be extended to larger block sizes, a different number of subblocks, and also nonrectangular subregions as described above.
In a further embodiment, the context model selection for larger transform blocks (e.g., for blocks greater than 8×8) is based on the number of already coded significant transform coefficients in a predefined neighborhood (inside the transform block). An example for the definition of neighborhoods, which corresponds to an embodiment of the invention, is illustrated in

 If the current scan position lies in the inside the 2×2 left corner 304, a separate context model is used for each scan position (
FIG. 9 , left illustration).  If the current scan position does not lie inside the 2×2 left corner and is not located on the first row or the first column of the transform block, then the neighbors illustrated on the right in
FIG. 9 are used for evaluating the number of significant transform coefficients in the neighborhood of the current scan position “x” without anything around it.  If the current scan position “x” without anything around it falls into the first row of the transform block, then the neighbors specified in the right illustration of
FIG. 10 are used.  If the current scan position “x” falls in to the first column of the block, then the neighbors specified in the left illustration of
FIG. 10 are used.
 If the current scan position lies in the inside the 2×2 left corner 304, a separate context model is used for each scan position (
In other words, the decoder 250 may be configured to sequentially extract the significance map syntax elements by contextadaptively entropy decoding by use of contexts which are individually selected for each of the significance map syntax elements depending on a number of positions at which according to the previously extracted and associated significance map syntax elements significant transform coefficients are situated, the positions being restricted to ones lying in a neighborhood of the position (“x” in
In an embodiment, the context model that is used for coding a particular significant_coeff_flag is chosen depending on the number of already coded significant transform coefficient levels in the defined neighborhoods. Here, the number of available context models can be smaller than the possible value for the number of significant transform coefficient levels in the defined neighborhood. The encoder and decoder can contain a table (or a different mapping mechanism) for mapping the number of significant transform coefficient levels in the defined neighborhood onto a context model index.
In a further embodiment, the chosen context model index depends on the number of significant transform coefficient levels in the defined neighborhood and on one or more additional parameters as the type of the used neighborhood or the scan position or a quantized value for the scan position.
For the coding of the last_significant_coeff_flag, a similar context modelling as for the significant_coeff_flag can be used. However, the probability measure for the last_significant_coeff_flag mainly depends on a distance of the current scan position to the topleft corner of the transform block. In an embodiment, the context model for coding the last_significant_coeff_flag is chosen based on the scan diagonal on which the current scan position lies (i.e., it is chosen based on x+y, where x and y represent the horizontal and vertical location of a scan position inside the transform block, respectively, in case of the above embodiment of
In an embodiment, different context modelling schemes are used for different sizes of transform blocks.
In the following the coding of the absolute transform coefficient levels is described.
In one embodiment, the size of subblocks is 2×2 and the context modelling inside the subblocks is disabled, i.e., one single context model is used for all transform coefficients inside a 2×2 subblock. Only blocks larger than 2×2 may be affected by the subdivision process. In a further embodiment of this invention, the size of the subblocks is 4×4 and the context modelling inside the subblocks is done as in H.264; only blocks larger than 4×4 are affected by the subdivision process.
As to the scan order, in an embodiment, a zigzag scan 320 is employed for scanning the subblocks 322 of a transform block 256 i.e. along a direction of substantially increasing frequency, while the transform coefficients inside a subblock are scanned in a reverse zigzag scan 326 (
Next embodiments for context modelling for the coefficient levels are described.
In an embodiment, the context modelling for a subblock is similar to the context modelling for 4×4 blocks in H.264 as has been described above. The number of context models that are used for coding the coeff_abs_greater_one syntax element and the first bin of the coeff_abs_level_minus_one syntax element is equal to five, with, for example, using different sets of context models for the two syntax elements. In a further embodiment, the context modelling inside the subblocks is disabled and only one predefined context model is used inside each subblock. For both embodiments, the context model set for a subblock 322 is selected among a predefined number of context model sets. The selection of the context model set for a subblock 322 is based on certain statistics of one or more already coded subblocks. In an embodiment, the statistics used for selecting a context model set for a subblock are taken from one or more already coded subblocks in the same block 256. How the statistics are used to derive the selected context model set is described below. In a further embodiment, the statistics are taken from the same subblock in a previously coded block with the same block size such as block 40a and 40a′ in
In an embodiment, the number of context model sets is equal to four, while in another embodiment, the number of context model sets is equal to 16. Commonly, the number of context model sets is not fixed and should be adapted in accordance with the selected statistics. In an embodiment, the context model set for a subblock 322 is derived based on the number of absolute transform coefficient levels greater than two in one or more already coded subblocks. An index for the context model set is determined by mapping the number of absolute transform coefficient levels greater than two in the reference subblock or reference subblocks onto a set of predefined context model indices. This mapping can be implemented by quantizing the number of absolute transform coefficient levels greater than two or by a predefined table. In a further embodiment, the context model set for a subblock is derived based on the difference between the number of significant transform coefficient levels and the number of absolute transform coefficient levels greater than two in one or more already coded subblocks. An index for the context model set is determined by mapping this difference onto a set of predefined context model indices. This mapping can be implemented by quantizing the difference between the number of significant transform coefficient levels and the number of absolute transform coefficient levels greater than two or by a predefined table.
In another embodiment, when the same adaptive scan is used for processing the absolute transform coefficient levels and the significance map, the partial statistics of the subblocks in the same blocks may be used to derive the context model set for the current subblock, or; if available, the statistics of previously coded subblocks in previously coded transform blocks may be used. That means, for example, instead of using the absolute number of absolute transform coefficient levels greater than two in the subblock(s) for deriving the context model, the number of already coded absolute transform coefficient levels greater than two multiplied by the ratio of the number of transform coefficients in the subblock(s) and the number of already coded transform coefficients in the subblock(s) is used; or instead of using the difference between the number of significant transform coefficient levels and the number of absolute transform coefficient levels greater than two in the subblock(s), the difference between the number of already coded significant transform coefficient levels and the number of already coded absolute transform coefficient levels greater than two multiplied by the ratio of the number of transform coefficients in the subblock(s) and the number of already coded transform coefficients in the subblock(s) is used.
For the context modelling inside the subblocks, basically the inverse of the stateoftheart context modelling for H.264 may be employed. That means, when the same adaptive scan is used for processing the absolute transform coefficient levels and the significance map, the transform coefficient levels are basically coded in a forward scan order, instead of a reverse scan order as in H.264. Hence, the context model switching have to be adapted accordingly. According to one embodiment, the coding of the transform coefficients levels starts with a first context model for coeff_abs_greater_one and coeff_abs_level_minus_one syntax elements, and it is switched to the next context model in the set when two coeff_abs_greater_one syntax elements equal to zero have been coded since the last context model switch. In other words, the context selection is dependent on the number of already coded coeff_abs_greater_one syntax elements greater than zero in scan order. The number of context models for coeff_abs_greater_one and for coeff_abs_level_minus_one may be the same as in H.264.
Thus, the above embodiments may be applied to the field of digital signal processing and, in particular, to image and video decoders and encoders. In particular, the above embodiments enable a coding of syntax elements related to transform coefficients in blockbased image and video codecs, with an improved context modelling for syntax elements related to transform coefficients that are coded with an entropy coder that employs a probability modelling. In comparison to the stateoftheart, an improved coding efficiency is achieved in particular for large transform blocks.
Although some aspects have been described in the context of an apparatus, it is clear that these aspects also represent a description of the corresponding method, where a block or device corresponds to a method step or a feature of a method step. Analogously, aspects described in the context of a method step also represent a description of a corresponding block or item or feature of a corresponding apparatus.
The inventive encoded signal for representing the transform block or the significance map, respectively, can be stored on a digital storage medium or can be transmitted on a transmission medium such as a wireless transmission medium or a wired transmission medium such as the Internet.
Depending on certain implementation requirements, embodiments of the invention can be implemented in hardware or in software. The implementation can be performed using a digital storage medium, for example a floppy disk, a DVD, a BlueRay, a CD, a ROM, a PROM, an EPROM, an EEPROM or a FLASH memory, having electronically readable control signals stored thereon, which cooperate (or are capable of cooperating) with a programmable computer system such that the respective method is performed. Therefore, the digital storage medium may be computer readable.
Some embodiments according to the invention comprise a data carrier having electronically readable control signals, which are capable of cooperating with a programmable computer system, such that one of the methods described herein is performed.
Generally, embodiments of the present invention can be implemented as a computer program product with a program code, the program code being operative for performing one of the methods when the computer program product runs on a computer. The program code may for example be stored on a machine readable carrier.
Other embodiments comprise the computer program for performing one of the methods described herein, stored on a machine readable carrier.
In other words, an embodiment of the inventive method is, therefore, a computer program having a program code for performing one of the methods described herein, when the computer program runs on a computer.
A further embodiment of the inventive methods is, therefore, a data carrier (or a digital storage medium, or a computerreadable medium) comprising, recorded thereon, the computer program for performing one of the methods described herein.
A further embodiment of the inventive method is, therefore, a data stream or a sequence of signals representing the computer program for performing one of the methods described herein. The data stream or the sequence of signals may for example be configured to be transferred via a data communication connection, for example via the Internet.
A further embodiment comprises a processing means, for example a computer, or a programmable logic device, configured to or adapted to perform one of the methods described herein.
A further embodiment comprises a computer having installed thereon the computer program for performing one of the methods described herein.
In some embodiments, a programmable logic device (for example a field programmable gate array) may be used to perform some or all of the functionalities of the methods described herein. In some embodiments, a field programmable gate array may cooperate with a microprocessor in order to perform one of the methods described herein. Generally, the methods are performed by any hardware apparatus.
The above described embodiments are merely illustrative for the principles of the present invention. It is understood that modifications and variations of the arrangements and the details described herein will be apparent to others skilled in the art. It is the intent, therefore, to be limited only by the scope of the impending patent claims and not by the specific details presented by way of description and explanation of the embodiments herein.
While this invention has been described in terms of several embodiments, there are alterations, permutations, and equivalents which fall within the scope of this invention. It should also be noted that there are many alternative ways of implementing the methods and compositions of the present invention. It is therefore intended that the following appended claims be interpreted as including all such alterations, permutations and equivalents as fall within the true spirit and scope of the present invention.
Claims
130. (canceled)
31. An apparatus for decoding transform coefficient blocks encoded in a data stream, comprising:
 a decoder configured to entropy decode a last significant syntax element extracted from the data stream, wherein the last significant syntax element indicates information regarding a transform coefficient at a respective position within a transform coefficient block, the transform coefficient being the last significant transform coefficient according to a scan order in the transform coefficient block; and
 an associator configured to associate the last significant syntax element with the respective position within the transform coefficient block in the scan order,
 wherein the decoder is configured to use, in entropy decoding the last significant syntax element, a context for the last significant syntax element, wherein the context is selected in relation to the respective position of the transform coefficient and a size of the transform coefficient block.
32. The apparatus according to claim 31, wherein the context for the last significant syntax element is selected based on information regarding significant syntax elements in a neighborhood of the position of the last significant syntax element within the transform coefficient block.
33. The apparatus according to claim 32, wherein the information regarding the syntax elements in the neighborhood relates to values of transform coefficients corresponding to the syntax elements.
34. The apparatus according to claim 32, wherein the information regarding syntax elements in the neighborhood relates to a number of transform coefficients corresponding to the syntax elements.
35. The apparatus according to claim 31, wherein the context for the last significant syntax element is selected based on the scan order, which is is selected from a plurality of scan orders.
36. The apparatus according to claim 32, wherein the neighborhood comprises at least one position adjacent to the position of the last significant syntax element.
37. The apparatus according to claim 36, wherein the neighborhood comprises at least one position horizontally adjacent to the last significant syntax element.
38. The apparatus according to claim 36, wherein the neighborhood comprises at least one position vertically adjacent to the last significant syntax element.
39. The apparatus according to claim 31, wherein the data stream comprises at least a portion associated with color samples.
40. An apparatus for encoding transform coefficient blocks into a data stream, the apparatus is configured to entropy encode a last significant syntax element into the data stream, wherein the last significant syntax element indicates information regarding a transform coefficient at a respective position within a transform coefficient block, the transform coefficient being the last significant transform coefficient according to a scan order in the transform coefficient block,
 wherein the apparatus is configured to use, in entropy encoding the last significant syntax element, a context for the last significant syntax element, wherein the context is selected in relation to the respective position of the transform coefficient and a size of the transform coefficient block.
41. The apparatus according to claim 40, wherein the context for the last significant syntax element is selected based on information regarding significant syntax elements in a neighborhood of the position of the last significant syntax element within the transform coefficient block.
42. The apparatus according to claim 41, wherein the information regarding the syntax elements in the neighborhood relates to values of transform coefficients corresponding to the syntax elements.
43. The apparatus according to claim 41, wherein the information regarding syntax elements in the neighborhood relates to a number of transform coefficients corresponding to the syntax elements.
44. The apparatus according to claim 40, wherein the context for the last significant syntax element is selected further based on the scan order, which is selected from the plurality of scan orders.
45. The apparatus according to claim 41, wherein the neighborhood comprises at least one position adjacent to the position of the last significant syntax element.
46. The apparatus according to claim 41, wherein the neighborhood comprises at least one position horizontally adjacent to the last significant syntax element.
47. The apparatus according to claim 41, wherein the neighborhood comprises at least one position vertically adjacent to the last significant syntax element.
48. The apparatus according to claim 40, wherein the data stream comprises at least a portion associated with color samples.
49. A nontransitory computerreadable medium for storing data associated with a video, comprising:
 a data stream stored in the nontransitory computerreadable medium, the data stream comprising information related to transform coefficient blocks including a last significant syntax element, wherein the last significant syntax element indicates information regarding a transform coefficient at a respective position within a transform coefficient block, the transform coefficient being the last significant transform coefficient according to a scan order in the transform coefficient block,
 wherein the last significant syntax element is encoded into the data stream in the scan order using entropy encoding based on a context selected for the last significant syntax element associated,
 wherein the context is selected in relation to the respective position of the transform coefficient and a size of the transform coefficient block.
50. The computerreadable medium according to claim 49, wherein the data stream comprises at least a portion associated with color samples.
Type: Application
Filed: Mar 25, 2021
Publication Date: Jul 8, 2021
Inventors: Heiner KIRCHHOFFER (Berlin), Heiko SCHWARZ (Panketal), Tung NGUYEN (Berlin), Detlev MARPE (Berlin), Thomas WIEGAND (Berlin)
Application Number: 17/212,396