Method and apparatus for improved significance flag coding using simple local predictor

Significance flags in advanced video compression systems are coded using contexts adaptive to the last N significance flags coded taken in a scanning order. One embodiment uses the last N significance flags in scanning order as a predictor to determine which of a plurality of sets of significance flag contexts to use for coding subsequent significance flags. A second embodiment uses the last N significance flags in scanning order as a predictor in order to modulate the probability value associated with significance flag contexts that are used to code significance flags for future coding.

TECHNICAL FIELD

The present principles relate to video compression and decompression systems generally and, more particularly to significance flag prediction in those systems.

BACKGROUND

Digital video compression systems generally partition digital images into smaller sized units of pixels to compress before transmission. In some compression standards, those smaller sized units are macroblocks and blocks. Blocks are arrays of luminance and chrominance values representative of the pixel values.

Video coding systems also use prediction and block-based transforms to leverage redundancy in intra/inter frame correlation and achieve high compression efficiency. Temporal redundancy is removed from a video sequence by predicting pixel values in a current frame from those in previous frames. Spatial redundancy is removed from a digital video image by predicting pixel values in a current block from those in spatially neighboring blocks that have previously been coded. After transforming the residual values resulting from prediction, the energy of the transform coefficients generally takes up a lower number of coefficients in the frequency domain. These transform coefficients are quantized and scanned in an order that allows them to be entropy coded in some compression systems. Entropy coding makes the coded bit-stream achieve its entropy boundary and further improves the coding efficiency.

An important usage of entropy coding in video coding system is the coding of the quantized transform coefficients of a block, which is the residual data block after intra/inter prediction, block transform, and quantization. For such data, entropy coding tools have been developed, ranging from variable length coding, such as the Huffman coding, to arithmetic coding. Huffman coding uses codes for component symbols, but arithmetic coding can use codes for entire messages.

In the HEVC/H.265 video compression standard, a new tool for coding binary data has been proposed that is based on arithmetic coding, namely the Context-Adaptive Binary Arithmetic Coding (or CABAC). CABAC codes binary symbols. A binary symbol s, which takes value 0 or 1, is coded followed by a probability p to be 1 and 1-p to be 0. This probability is deduced from a context and is adapted after each symbol coding to allow better modeling of probabilities.

CABAC is also the entropy coding method for the quantized transform coefficient block in the International Organization for Standardization/International Electrotechnical Commission (ISO/IEC) Moving Picture Experts Group-4 (MPEG-4) Part10Advanced Video Coding (AVC) Standard/International Telecommunication Union, Telecommunication Sector (ITU-T) H.264 Recommendation (hereinafter the “MPEG-4 AVC Standard”). CABAC achieves high coding efficiency, but the non-systematic implementation of the CABAC coding procedure results in two scanning passes being performed to code a data block for AVC. In the first pass, CABAC codes the significance map of the block according to a forward zigzag scanning order. In the second pass, CABAC codes the non-zero values in an inverse zigzag scanning order.

Turning toFIG. 1, an example of CABAC coding is indicated generally by the reference numeral100. In the significance map coding pass, i.e., the first pass, CABAC uses the sig_flag and last_flag to indicate the positions of the non-zero coefficients.

In the inverse zigzag coding of the non-zero values, two sub-coding processes are used. In the first sub-coding process, a syntax called Bin_1 (i.e., the first bin) is used to indicate whether or not a non-zero coefficient has an absolute value of one. If the non-zero coefficient has an absolute value of one, then Bin_1=1 and the sign of the non-zero coefficient is sent out. Otherwise, Bin_1=0 and the encoding moves to the second sub-coding process. In the second sub-coding process, CABAC codes the coefficients which have an absolute value greater than one, corresponding to Bin_1=0, and then sends out their respective signs.

In addition, the design of CABAC is mainly for smaller block sizes (e.g., 4×4 and 8×8). CABAC turns out to be less efficient for larger blocks (e.g., 16×16, 32×32, and 64×64).

For HEVC, after transforming a transforming a Transform Unit (TU) from the pixel domain to the frequency domain using a transform (such as a Discrete Sine Transform (DST) or Discrete Cosine Transform (DCT)), the transformed coefficients are coded one by one using the following scheme:a significance flag signaling whether or not the coefficient is non-zeroif the significance flag is true, a sign bitif the significance flag is true, a “greater than one” (greater1) flag signaling whether or not the coefficient magnitude is strictly higher than oneif the greater1 flag is true, a “greater than two” (greater2) flag signaling whether or not the coefficient magnitude is strictly higher than twoif the greater2 flag is true, the remainder of the coefficient magnitude is coded using an expGolomb code.

Significance flags, greater1 flags and greater2 flags are coded using CABAC with dedicated contexts. The following embodiments will focus on increasing the coding efficiency of the significance flag by improving the contextual information of the CABAC.

SUMMARY

These and other drawbacks and disadvantages of the prior art are addressed by the present principles, which are directed to a method and apparatus for improved significance flag coding using simple local predictors.

In two embodiments, methods are provided comprising modifying a significance flag context based on a plurality of the last N significance flags corresponding to a scanning order of a portion of an image, and coding, or decoding, a subsequent significance flag using said modified significance flag context.

In other embodiments, apparatus are provided a processor, configured to modifying a significance flag context based on a plurality of the last N significance flags corresponding to a scanning order of a portion of an image, and an encoder, or decoder that uses the modified significance flag context in encoding, or decoding, video for a portion of an image.

In one particular embodiment, a method is provided comprising determining a significance flag predictor using a vector that is representative of a plurality of the last N significance flags corresponding to a scanning order of a portion of an image. The method further comprises updating a probability value associated with a significance flag context using the significance flag predictor and further comprises coding a subsequent significance flag using the updated probability value associated with the significance flag context.

In another particular embodiment, a second method is provided comprising selecting a first set of significant flag contexts to be used in coding a first significant flag for a portion of an image and further comprising coding each subsequent significant flag in the portion of the image using either the first set of significant flag contexts or a second set of significant flag contexts based on the last N significant flags corresponding to a scanning order of the portion of the image.

In another embodiment, a third method is provided comprising determining a significance flag predictor using a vector that is representative of a plurality of the last N significance flags corresponding to a scanning order of a portion of an image. The method further comprises updating a probability value associated with a significance flag context using the significance flag predictor, and, decoding a subsequent significance flag using the updated probability value associated with the significance flag context.

In yet another embodiment, a fourth method is provided comprising selecting a first set of significant flag contexts to be used in coding a first significant flag for a portion of an image, and, decoding each subsequent significant flag in the portion of the image using either the first set of significant flag contexts or a second set of significant flag contexts based on the last N significant flags corresponding to a scanning order of the portion of the image.

In another embodiment, an apparatus is provided comprising a processor, configured to implement a buffer to store significance flags in a scanning order, circuitry to determine which one of a plurality of significance flag context sets to use, based on the stored significance flags, to encode a next significance flag and a switch to enable the selected significance flag context set to be sent to an encoder; and, an encoder that uses the selected significance flag context set in encoding video for a portion of an image.

In another embodiment, a second apparatus is provided comprising a processor, configured to implement a buffer to store significance flags in a scanning order and to generate a predictor, based on the stored significance flags, to update a probability associated with a significance flag context, and, an encoder that uses the updated probability in encoding video for a portion of an image.

In another embodiment, a third apparatus is provided comprising a processor, configured to implement a buffer to store significance flags in a scanning order, circuitry to determine which one of a plurality of significance flag context sets to use, based on the stored significance flags, to encode a next significance flag and a switch to enable the selected significance flag context set to be sent to an encoder, and, a decoder that uses the selected significance flag context set in decoding video for a portion of an image.

In another embodiment, a fourth apparatus is provided comprising a processor, configured to implement a buffer to store significance flags in a scanning order and to generate a predictor, based on the stored significance flags, to update a probability associated with a significance flag context, and, a decoder that uses the updated probability in decoding video for a portion of an image.

In another embodiment, a non-transitory computer readable storage medium is provided having stored thereon instructions for video encoding or decoding, when executed, implement a method according to any one of the above methods.

In another embodiment, a non-transitory computer readable storage medium is provided having stored thereon a bitstream generated according to any one of the aforementioned encoding embodiments.

In another embodiment, a bitstream generated according to the video encoding method is provided.

DETAILED DESCRIPTION

In the past, during the HEVC standardization process, and now during the development of successors to the HEVC standard, it has been identified that more efficient coding performance is achieved by adding a context dependence on the value of the neighboring significance flags. This has not been accepted in the HEVC standard because it increases the number of contexts and adds extra computation and memory-bandwidth consumption in finding the neighboring flags and computing an associated predictor. However, this is again being considered for the next generation of codecs. Examples of tested neighborhoods used for significance flag coding are presented inFIG. 2.FIG. 2shows the neighborhoods of significance flags (hashed, A to K) used to adapt the context of the current significance flag (X) to be coded used in prior methods.

The proposed solution is a new predictor for the significance flags. This predictor does not depend on the spatial neighbors of the current significance flags to be coded, but instead on criteria such as the last coded significance flag in the scanning order, for example.

A particular implementation is provided that has the following advantages compared to the prior art. The implementation does not require extra memory access to preceding coded significance flags. The computational cost is negligible, and it does not negatively impact the spatial independence of significance flags between Coding Groups.

Two main embodiments are provided for using the new predictor. First, the new predictor is used as a switch between duplicated contexts associated to significance flags. And second, the new predictor is used as a modulation of the probability determined form the current significance flag context.

While the first embodiment shows more coding gains, it requires more contexts. The second embodiment still shows gain compared to HEVC, although less than the first method, but it adds virtually no complexity to HEVC.

In HEVC, a context value is an 8 bit value as inFIG. 3. The leading bit represents the Most Probable Symbol (or MPS) and the next 7 bits represent a probability p′ (or state) from which the probability p is deduced. The update of the context value is made following the process shown inFIG. 4, depending on whether or not the coded symbol equals the MPS. The evolution is made through two tables, transldxMPS if the coded symbol is the MPS, and transldxLPS if the coded symbol is not the MPS, that is, it is the Least Probable Symbol (LPS). These tables are provided in Table 1 for the entry p′, also named pStateldx.

TABLE 1tables for the evolution of the context stateTable 9-41 - State transition tablepStateIdx0123456789101112131415transIdxLps0012244567899111112transIdxMps12345678910111213141516pStateIdx16171819202122232425262728293031transIdxLps13131515161618181919212122222324transIdxMps17181920212223242526272829303132pStateIdx32333435363738394041424344454647transIdxLps24252626272728292930303031323233transIdxMps33343536373839404142434445464748pStateIdx48495051525354555657585960616263transIdxLps33333434353535363636373737383863transIdxMps49505152535455565758596061626263

The probability pmpsof the symbol s to be the MPS is quantized linearly using 8 bits, from 0 to 127. It is deduced from the context value by
PMPS=(p′+64)/127=(pStateldx+64)/127
and the probability p of the symbol s to be 1 is deduced obviously from Pmpsdepending on the value of the MPS.
p=PMPSif MPS=1,
p=1−pmpsif MPS =0.

Context-Adaptive coding is a powerful tool that allows to follow dynamically the statistics of the channel to which the symbol belongs. Also, each channel should have its own context to avoid mixing statistics and losing the benefit of the process. This has led to the extensive use of many contexts in HEVC/H.265, up to several hundred, in order to model many channels.

In HEVC, a Transform Unit (TU) is divided, for example, into 4×4 blocks (labelled as CG for Coding Group inFIG. 5) that are coded with weak interaction between them. Weak interaction means that coefficient coding between two blocks does not directly interact. For instance, a 16×16 Transform Unit is divided into 16 blocks as shown inFIG. 5.

The transformed Transform Unit can be scanned in a particular order. Depending on this order, the position of the last significant (non-zero) coefficient is determined and coded in the bitstream. Consequently, only a subset of each of the sub-blocks may contain significant coefficients, as shown inFIG. 6.

Attached to each sub-block (labelled CG inFIG. 5) is a coding flag signaling if there is a significant flag in the sub-block. InFIG. 6, only those sub-blocks with a “?” have a coded flag that is encoded in the bitstream, while those with explicit “1” or “2” in their blocks have their coding flag inferred by the following rules:Of course, the coding flag of the sub-block containing the last significant coefficient is oneAlso, the coding flags of the sub-blocks coming after the sub-block containing the last significant coefficient are zeroThe coding flag of the first (top left) sub-block is automatically inferred to one as it is very likely that there is a significant coefficient at the low frequency position. This inference may rarely be wrong, thus leading to the coding of 16 significance flags to zero.

Inside a sub-block, the coefficients are scanned following a given scan order, for example, as shown inFIG. 7. The associated significance flags are coded in this order.

For HEVC, significance flags are coded using CABAC with many contexts that depend on such things as slice type (I, P or B), luma or chroma channel, the Transform Block size, neighboring sub-block coding flags, the position of the sub-block in the Transform Block, and the position of the coefficient in the sub-block.

There are 42 contexts for each slice type, and thus a total of 3*42=126 contexts as provided in the HEVC standard document. The relevant table is shown in Table 2 inFIG. 19.

FIG. 8shows that there are27significance flag contexts for the luma Transform Block and15significance flag context for the chroma Transform Block. The DC coefficient has its own context, index 0 for luma and index 27 for chroma. These contexts depend on the Transform Block size (4×4, 8×8 or 16×16 and larger). For 8×8 or larger luma Transform Blocks, the context index also depends on the position of the sub-block (top-left or otherwise) in the Transform Block. The structure of the contexts differ depending on whether the Transform Block size is 4×4, as detailed below.

For 4×4 Transport Blocks, regardless of color channel, the context indices depend only on the position of the coefficient in the unique sub-block of the Transform Unit. This is shown inFIG. 9for the luma 4×4 Transform Block, and this is similar for chroma 4×4 Transform Block by adding a27value to the indices.

For Transform Block sizes equal or larger than 8×8, one notices fromFIG. 8that there is one context to be chosen among three contexts. Applying a coherent shift depending on the Transform Block size, the sub-block position and the color channel, one may label these indices 0, 1 and 2 without ambiguity.

FIG. 10depicts that this label depends on the value of the bottom and right sub-block coding flags, and the position of the coefficient inside the current sub-block.

The embodiments presented herein do not change the above-described methods used to determine the context index. Instead, these embodiments provide extra information via a new predictor to be used to refine a probability attached to the context, or to choose between multiple significance flag context sets. The aforementioned probability represents the probability of the current significance flag to be true. In either case, the predictor, for updating a probability or for the decision as to which set of significance flag contexts to use, is determined based on past significance flags, and particularly using past significance flags according to a scanning order.

Some examples are now shown to demonstrate methods of constructing the new predictor. Two embodiments will describe use of this predictor. In order to synchronize a decoder with an encoder, the predictor proposed herein is generated in both an encoder and a decoder.

The proposed predictor is a circular buffer B of size N storing the N values of the last N coded, or decoded, significant flags. The circular buffer is filled as follows:

1. The initial state is all N entries set to zero

2. Starting from the last coefficient and going to the DC coefficient following the reverse scan order, one proceeds with the coding, or decoding, of significance flags as follows:a. obtain the scanning position pos of the current significance flagb. encode, or decode, the current significance flag f using the circular buffer as predictorc. update the circular buffer by B[pos mod N]=f
In a preferred variant, the size of the buffer is N=4 such that (I mod N) is simply computed by using a binary mask and the buffer is updated by B[pos&3]=f.

In HEVC, only the update of the circular buffer has to be added to the encoding, or decoding, process, such that the computational cost to determine the predictor state is virtually zero. One should note that “modulo” is a complex operation, but using a value of N that is a power of two allows the modulo operation to be implemented using a mask, making the operation virtually costless.

In a first embodiment, one of a plurality of sets of significant flag contexts are chosen based on the contents of the significance flag buffer, which stores the last N significance flags in a scanning order. For example, in HEVC the 42 significant flag contexts are duplicated to get two sets of 42 contexts. One of the duplicated sets is for a “normal” regime and another set for a “full” regime in which most of the significant flags are one. The switch between the two sets is driven by a 4 element circular buffer predictor as previously described. The procedure is that for each sub-block, the “normal” set is selected for coding of the first significant flag in the sub-block. Then for the following significant flags, if the number of “1 s” (trues) in the circular buffer is greater than or equal to 3, then the “full” set is selected. If the number of “1 s” (trues) in the circular buffer is less than or equal to 1, then the “normal” set is selected. If the number of “1 s” (trues) in the circular buffer is equal to 2, then the same set as used for the preceding significant flag is selected.

This example embodiment uses a circular buffer length of 4 and determines which context set to use based on the number of 1s in the circular buffer. These values are only used as an example here and do not limit the scope of the idea. A generalized rule for this embodiment is that a switch between M different sets of contexts depends on the number of 1s in the N length buffer. The exact number of 1s needed for switching between the M sets can be different than this example, or the decision can be some function of the contents of the buffer, for example, weighting the different positions in the buffer with weights.

FIG. 11shows one embodiment of a method1100for encoding significance flags using the present principles. The method commences at block1101and proceeds to block1110for selecting an initial significance flag context set to use for coding a first significance flag in a coding block or sub-block. The method proceeds from block1110to block1120in which subsequent significant flags are coded using a selected significance flag context set chosen from among a plurality of significance flag context sets using the last N significance flags in a scanning order. The determination can be based on the number of 1s of the last N significance flags in a scanning order, or some other function of those significance flags.

FIG. 12shows two embodiments of apparatus for encoding significance flags using the present principles. In the apparatus1200ofFIG. 12a, Buffer1210receives on its input significance flags for sub-blocks in scanning order from Encoder1250. Buffer1210stores the last N significance flags from the scanning order. The output of buffer1210is in signal connectivity with the input of a context determination circuit1220that determines, from the significance flags stored in Buffer1210, a control signal to be used to determine which of a plurality of significance flag context sets should be used to code the next significance flag. The control signal can be based on the number of 1s in the last N significance flags in a scanning order, or on some other function of those significance flags.

The control signal is output from circuit1220to a first input of Switch1240. Switch1240also receives N inputs, representing significance flag context sets 1 through N1230, on its input ports. The control signal from circuit1220selects one of the N sets of significance flag contexts and outputs the selected significance flag context to encoder1250on an output port. Encoder1250then uses the selected significance flag context set to encode subsequent significance flags for additional sub-blocks.

FIG. 12bshows an embodiment of an apparatus1255for encoding significance flags using the present principles using a processor. Processor1260receives on its input significance flags for sub-blocks in scanning order from Encoder1270. Processor1260determines which of a number of stored significance flag context sets to output on an output port to an input of Encoder1270for subsequent coding of additional significance flags for future sub-blocks. Processor1260can base this determination on the number of 1s in the last N significance flags in a scanning order, or on some other function of those significance flags.

FIG. 13shows one embodiment of a method1300for decoding significance flags using the present principles. The method commences at block1101and proceeds to block1110for selecting an initial significance flag context set to use for decoding a first significance flag in a coding block or sub-block. The method proceeds from block1110to block1120in which subsequent significant flags are decoded using a selected significance flag context set chosen from among a plurality of significance flag context sets using the last N significance flags in a scanning order. The determination can be based on the number of 1s of the last N significance flags, or some other function of those significance flags.

FIG. 14shows two embodiments of apparatus for decoding significance flags using the present principles. In the apparatus1400ofFIG. 14a, Buffer1410receives on its input significance flags for sub-blocks in scanning order from Decoder1450. Buffer1410stores the last N significance flags from the scanning order. The output of buffer1410is in signal connectivity with the input of a context determination circuit1420that determines, from the significance flags stored in Buffer1410, a control signal to be used to determine which of a plurality of significance flag context sets should be used to decode the next significance flag. The control signal can be based on the number of 1s in the last N significance flags in a scanning order, or on some other function of those significance flags. The control signal is output from circuit1420to a first input of Switch1440. Switch1440also receives N inputs, representing significance flag context sets 1 through N1430, on its input ports. The control signal from circuit1420selects one of the N sets of significance flag contexts and outputs the selected significance flag context to Decoder1450on an output port. Decoder1450then uses the selected significance flag context set to decode subsequent significance flags for additional sub-blocks.

FIG. 14bshows an embodiment of an apparatus1455for decoding significance flags using the present principles using a processor. Processor1460receives on its input significance flags for sub-blocks in scanning order from Decoder1470. Processor1460determines which of a number of stored significance flag context sets to output on an output port to an input of Decoder1470for subsequent decoding of additional significance flags for future sub-blocks. Processor1460can base this determination on the number of 1s in the last N significance flags in a scanning order, or on some other function of those significance flags.

A second embodiment is an application of the proposed predictor to modulate the context probability. This embodiment is a specific variation of a previously disclosed idea in European Application 16305554.4, Context with Adaptive Probability for Video Coding. That application discloses the idea is of modulating the probability attached to a context by some information that subdivides the channel to which the context is attached into sub-channels that share this common context.

Here, in the second embodiment, the probability p that the significant flag is 1 of the significant flag context is modified into pmdepending on the predictor as follows:
pm=pΔwhere Δ is a modulation value that depends on the predictor state.

In a variation of this second embodiment, the modulation value Δ is computed by the following process. For each sub-block, an initial value Δ=0 is selected for the coding of the first significant flag. Then, for the following significant flags, if the number of “1s” in the circular buffer is greater than or equal to 3, then the value Δ=Δpis selected. If the number of “1s” in the circular buffer is less than or equal to 1, then the value Δ=Δnis selected. And, if the number of “1s” in the circular buffer is equal to 2, then the value Δ=0 is selected. The values Δpand Δnare two parameters that are, respectively, positive and negative. This variation of the second embodiment is easily generalized by stating that the modulation value is determined by the number of “1 s” in the circular buffer.

In another variation, the modulation value is a weighted sum of the circular buffer entries:

Δ=∑k=0N-1⁢wk⁢B⁡[k]
where the wk's are weights that can depend on the scanning position.

FIG. 15shows one embodiment of a method1500for encoding significance flags using the present principles. The method commences at block1501and proceeds to block1510for determining a significance flag predictor from previous significance flags in a scanning order. The predictor can be determined by counting the number of 1s in the last N significance flags in a scanning order, or on some other function of those significance flags. Control proceeds from block1510to block1520for updating a probability associated with a significance flag context based on the determined predictor from block1510. That probability can be updated, for example, by adding a predictor to the current predictor, either a default value or the last predictor value used. For example, with a 4 element buffer storing the last 4 significant flags in a coding order, the predictor for the next significant flag context probability can be determined by selecting a positive predictor if the number of 1s in the buffer at that time is greater than or equal to 3, selecting a negative predictor if the number of 1s in the buffer at that time is less than or equal to 1, and not adding any predictor to the significant flag context probability if the number of 1s in the buffer is two. Control then proceeds from block1520to block1530for coding a next significance flag using the updated probability calculated in block1520.

FIG. 16shows two embodiments of apparatus for encoding significance flags using the present principles.FIG. 16ashows an apparatus1600comprising a Buffer of length N that stores significance flags for sub-blocks in a scanning order that are being encoded by Encoder1640. The significance flags are input to an input port of Buffer1610and are sent from an output port of Buffer1610to an input of Predictor Generator circuit1620, which is in signal connectivity with Buffer1610and receives the significance flags on an input port of Predictor Generator circuit1620. Predictor generator circuit1620can form a probability prediction by counting the number of 1s in the last N significance flags in a scanning order, or on some other function of those significance flags. The probability prediction is output on an output port of Predictor Generator1620to a first input port of Adder1630, which adds the probability prediction to the previous version of the probability on a second input port to Adder1630. The output of Adder1630is in signal connectivity with an input port of Encoder1640, which uses the updated probability associated with the significance flag context to be used for the next coded significance flag, to be output from Encoder1640.

FIG. 16bshows a similar embodiment as inFIG. 16a, but the apparatus1650comprises Processor1660which performs the functions of Buffer1610, Predictor Generator circuit1620and Adder1630inFIG. 16b. Encoder1670then uses the updated probability, output from Processor1660and which is associated with the significance flag context to be used for the next coded significance flag to be output from Encoder1670.

FIG. 17shows one embodiment of a method1700for decoding significance flags using the present principles. The method commences at block1701and proceeds to block1710for determining a significance flag predictor from previous significance flags in a scanning order. The predictor can be determined by counting the number of 1s in the last N significance flags in a scanning order, or on some other function of those significance flags. Control proceeds from block1710to block1720for updating a probability associated with a significance flag context based on the determined predictor from block1710. That probability can be updated, for example, by adding a predictor to the current predictor, either a default value or the last predictor value used. For example, with a 4 element buffer storing the last 4 significant flags in a coding order, the predictor for the next significant flag context probability can be determined by selecting a positive predictor if the number of 1s in the buffer at that time is greater than or equal to 3, selecting a negative predictor if the number of 1s in the buffer at that time is less than or equal to 1, and not adding any predictor to the significant flag context probability if the number of 1 s in the buffer is two. Control then proceeds from block1720to block1730for decoding a next significance flag using the updated probability calculated in block1720.

FIG. 18shows two embodiments of apparatus for decoding significance flags using the present principles.FIG. 18ashows an apparatus1800comprising a Buffer of length N that stores significance flags for sub-blocks in a scanning order that are being decoded by Decoder1840. The significance flags are input to an input port of Buffer1810and are sent from an output port of Buffer1810to an input of Predictor Generator circuit1820, which is in signal connectivity with Buffer1810and receives the significance flags on an input port of Predictor Generator circuit1820. Predictor generator circuit1820can form a probability prediction by counting the number of 1s in the last N significance flags in a scanning order, or on some other function of those significance flags. The probability prediction is output on an output port of Predictor Generator1820to a first input port of Adder1830, which adds the probability prediction to the previous version of the probability on a second input port to Adder1830. The output of Adder1830is in signal connectivity with an input port of Decoder1840, which uses the updated probability associated with the significance flag context to be used for the next decoded significance flag, to be output from Decoder1640.

FIG. 18bshows a similar embodiment as inFIG. 18a, but the apparatus1850comprises Processor1860which performs the functions of Buffer1810, Predictor Generator circuit1820and Adder1830inFIG. 18b. Encoder1870then uses the updated probability, output from Processor1860and which is associated with the significance flag context to be used for the next decoded significance flag to be output from Encoder1870.

In these two embodiments and their variations, some number of preceding significant flags used to predict the current significant flag are not spatial neighbors, but are the last N coded significance flags. By last it is understood to be relative to the scanning order of the coefficients. A variant with an N-circular buffer is provided with very low complexity for values of N that are a power of two.

Particular advantages of these embodiments is that they improve the compression efficiency of video compression techniques, such as HEVC successors, without adding significant complexity to either an encoder or a decoder.

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

The present description illustrates the present principles. It will thus be appreciated that those skilled in the art will be able to devise various arrangements that, although not explicitly described or shown herein, embody the present principles and are included within its scope.