Abstract:
Information to be transmitted may be compressed using range coding for adaptive arithmetic coding with a virtual sliding window. Cost and complexity of coding may be reduced in some cases.

Description:
BACKGROUND 
       [0001]    This relates to compression of information for electronic transmission. 
         [0002]    Coding processes in real-time time video compression and transmission systems are done in a strictly limited period of time. For example, for high definition television 1080 p (1080×1920 60 fps), every frame is encoded during 17 milliseconds. When the next successive frame arrives at the input of compression system, it is immediately processed. 
         [0003]    Compression is used in video and image applications such as conferencing, gaming, and entertainment. 
         [0004]    An entropy coder is one of the key elements of video compression systems. It is also one of the most computationally complex elements. An entropy coder is a data compression block that assigns codes to symbols so as to match code lengths with the probabilities of the symbols. The problem here is to find a tradeoff between effective compression of input data and minimum complexity costs. 
         [0005]    Usually, entropy coding is realized in modern video compression systems using paired Run-Length and Variable-Length Coding or Arithmetic coding (e.g. Tier-1 in JPEG2000). JPEG 2000 Standard Part I, Final Committee Draft vol. 0, 16 Mar. 2000. Arithmetic coding provides a better compression rate, but it is more complex. For example, Tier-1 is the most complex part of JPEG 2000, which consumes more than 50% of total computation power. 
     
    
     
       BRIEF DESCRIPTION OF THE DRAWINGS 
         [0006]      FIG. 1  is a schematic depiction of coding according to one embodiment; and 
           [0007]      FIG. 2  is a schematic depiction of a processor-based system according to one embodiment. 
       
    
    
     DETAILED DESCRIPTION 
       [0008]    An entropy coding algorithm may utilize range coding for adaptive arithmetic coding and a virtual sliding window algorithm for estimating input symbol probabilities. This light-weight, adaptive arithmetic coding solution decreases complexity and cost compared to conventional arithmetic coders in some embodiments. At the same time it may be more convenient for hardware implementations and may reduce the size of a finite hardware solution in some cases. The range coder and virtual sliding window may be applied to a Tier-1 coding block (Context Adaptive Arithmetic Coding, so-called MQ-coder) in the JPEG2000 image compression standard, for example. 
         [0009]    An adaptive binary arithmetic coder can be viewed as an encoding device that accepts the binary symbols of a source sequence, along with their corresponding probability estimates, and produces a code stream. Adaptability is provided by updating the probability estimate of a symbol based upon its present value and history. 
         [0010]    Practical implementations of arithmetic coding are always less efficient than an ideal one. Finite-length registers limit the smallest probability that can be maintained, and computational speed requires approximations, such as replacing multiplies with adds and shifts. Moreover, symbol probabilities are typically chosen from a finite set of allowed values, so the true symbol probabilities must often be approximated. 
         [0011]    A low-complexity Tier-1 coding using range coder with a virtual sliding window may have better compression results with lower complexity costs than a standard Tier-1 using an MQ-coder in some embodiments. Referring to  FIG. 1 , the building blocks of an encoder  10  may be divided into two groups: (1) pre-processing  12 , discrete wavelet transformation (DWT)  14 , quantization  16  and (2) Embedded Block Coding with Optimized Truncation (EBCOT) using bit-plane encoding and context-based adaptive binary arithmetic coder, MQ coder (Tier-1 coding)  18 , and rate-distortion optimization and bit stream layer formation (Tier-2 coding)  24 . 
         [0012]    Tier-1 is the most complex part of JPEG 2000 encoder, consuming more than 50% of total computational power. Therefore, performance of the original standard may be improved by improving arithmetic coding. 
         [0013]    To encode the binary bitplanes of the quantizer index, JPEG 2000 uses a context-based adaptive binary arithmetic coder with renormalization-driven probability estimation, known as the MQ-coder. The input to an entropy coder is a sequence of binary symbols and corresponding probabilities. 
         [0014]    The probability of a binary symbol is estimated from a context formed and updated according to a finite-state machine every time a symbol is encoded. The mechanism of estimating symbols probability and arithmetic coding form an MQ-coder. 
         [0015]    The range coder is one of the most efficient implementations of arithmetic coders. Low-complexity entropy coding may use a range coder  22  and virtual sliding window (VSW) algorithm  20  for probabilities estimation. 
         [0016]    The VSW algorithm  20  is an adaptive mechanism for estimating the probability of ones at the output of binary non-stationary sources. The algorithm may be utilized as an alternative adaptation mechanism in a context-based adaptive binary arithmetic codec. 
         [0017]    Redundancy in a message can be thought of as consisting of contextual redundancy and alphabetic redundancy. The fact that the letter Q is nearly always followed by the letter U is an example of contextual redundancy. The fact that the letter E is far more common than the letter X is an example of alphabetic redundancy. Range coding is an algorithm for removing both types of redundancy. 
         [0018]    If a storage medium has a width of s, or a width of d digits of base b, it can take one of s, or one of b d , different values. If the width is not specified in digits, then absolute numbers are used. If a letter is stored in the storage medium and the medium is restricted to taking one of t different values, then the width of the encoding of the letter is s/t, and the remaining width is t, in which a remainder of width t is stored. The set of t different values that can represent the letter is the range of the letter in the width of storage. For example, if the range of a letter in a byte of storage of width 256 is (n|240≦n&lt;250), then the width of the letter is 25.6, and the remaining width is 10. Anything that could be stored in a decimal digit may be stored as a remainder. 
         [0019]    Range encoding conceptually encodes all the symbols of the message into one number, unlike Huffman coding which assigns each symbol a bit-pattern and concatenates all the bit-patterns together. Thus, range encoding can achieve greater compression ratios than the one-bit-per-symbol upper bound on Huffman encoding and it does not suffer the inefficiencies that Huffman encoding does when dealing with probabilities that are not exact powers of two. 
         [0020]    One concept in range encoding is that, given a large-enough range of integers, and a probability estimation for the symbols, the initial range can easily be divided into sub-ranges whose sizes are proportional to the probability of the symbol they represent. Each symbol of the message can then be encoded in turn, by reducing the current range down to just that sub-range which corresponds to the next symbol to be encoded. The decoder has the same probability estimation used by the encoder, which can either be sent in advance, derived from already transferred data or be part of the compressor and decompressor, as examples. 
         [0021]    When all symbols have been encoded, merely identifying the sub-range is enough to communicate the entire message (presuming of course that the decoder is somehow notified when it has extracted the entire message). A single integer is actually sufficient to identify the sub-range, and it may not even be necessary to transmit the entire integer. If there is a sequence of digits, such that every integer beginning with that prefix falls within the sub-range, then the prefix alone is all that is needed to identify the sub-range and thus transmit the message. 
         [0022]    A sliding window algorithm keeps W previous encoded symbols, where W is length of buffer. After encoding of each symbol, the buffer contents are shifted by one position, a new symbol is written to the free cell and the earliest symbol in buffer is erased. This buffer is called “sliding window” after the method of buffer content manipulation. 
         [0023]    For binary sources, probability of ones is estimated by Krichevsky-Trofimov formula 
         [0000]    
       
         
           
             
               
                 
                   
                     
                       p 
                       ^ 
                     
                     t 
                   
                   = 
                   
                     
                       
                         S 
                         t 
                       
                       + 
                       0.5 
                     
                     
                       W 
                       + 
                       1 
                     
                   
                 
               
               
                 
                   ( 
                   1 
                   ) 
                 
               
             
           
         
       
     
         [0024]    where S t  is the number of ones in the window at time t. See E. Krichevski, “The Performance of Universal Encoding,” IEEE Transactions Inform. Theory, vol. IT-27, pps. 199-207, March 1981. 
         [0025]    Suppose a “sliding window” of W cells is given. On input of the next symbol, one cell is chosen at random. The symbol in the chosen cell is replaced by the newly received symbol. 
         [0026]    The rule of recalculation in integer implementation can have the following interpretation. Let there be a “sliding window” of cW cells, where c is the algorithm parameter. The value of received symbol is put into c randomly chosen cells and the average number of ones in selected c cells is removed from the window. 
         [0027]    Now suppose that the number of ones in the window of cW cells after encoding of next symbol x t  is recalculated by the rule 
         [0000]    
       
         
           
             
               
                 
                   
                     
                       
                         S 
                         
                           t 
                           + 
                           1 
                         
                       
                       = 
                       
                         
                           S 
                           t 
                         
                         + 
                         
                           [ 
                           
                             
                               cW 
                               - 
                               
                                 S 
                                 t 
                               
                               + 
                               
                                 W 
                                 2 
                               
                             
                             W 
                           
                           ] 
                         
                       
                     
                     , 
                     
                       
                         if 
                          
                         
                             
                         
                          
                         
                           x 
                           t 
                         
                       
                       = 
                       1. 
                     
                   
                    
                   
                     
 
                   
                    
                   
                     
                       
                         S 
                         
                           t 
                           + 
                           1 
                         
                       
                       = 
                       
                         
                           S 
                           t 
                         
                         - 
                         
                           [ 
                           
                             
                               
                                 S 
                                 t 
                               
                               + 
                               
                                 W 
                                 2 
                               
                             
                             W 
                           
                           ] 
                         
                       
                     
                     , 
                     
                       
                         if 
                          
                         
                             
                         
                          
                         
                           x 
                           t 
                         
                       
                       = 
                       0. 
                     
                   
                 
               
               
                 
                   ( 
                   2 
                   ) 
                 
               
             
           
         
       
     
         [0028]    Further, we shall call recalculation rule (2) a “virtual sliding window” (VSW). Probability estimation of ones for binary source output for VSW algorithm implementation is defined as 
         [0000]    
       
         
           
             
               
                 
                   
                     
                       
                         
                           p 
                           ^ 
                         
                         t 
                       
                       = 
                       
                         
                           S 
                           t 
                         
                         cW 
                       
                     
                     , 
                     
                       
                         if 
                          
                         
                             
                         
                          
                         
                           x 
                           t 
                         
                       
                       = 
                       1. 
                     
                   
                    
                   
                     
 
                   
                    
                   
                     
                       
                         
                           p 
                           ^ 
                         
                         t 
                       
                       = 
                       
                         1 
                         - 
                         
                           
                             S 
                             t 
                           
                           cW 
                         
                       
                     
                     , 
                     
                       
                         if 
                          
                         
                             
                         
                          
                         
                           x 
                           t 
                         
                       
                       = 
                       0. 
                     
                   
                 
               
               
                 
                   ( 
                   3 
                   ) 
                 
               
             
           
         
       
     
         [0029]    If W=2 i  is chosen where i is a positive integer, division can be replaced by shift operation. 
         [0030]    As a criterion for choice of parameter c we shall take the equality of minimal probability estimation of ones for binary source output for ISW and VSW algorithms. From (1) it follows that the minimal estimated probability for ISW algorithm is 
         [0000]    
       
         
           
             
               
                 
                   
                     
                       p 
                       ^ 
                     
                     
                       m 
                        
                       
                           
                       
                        
                       i 
                        
                       
                           
                       
                        
                       n 
                     
                   
                   = 
                   
                     1 
                     
                       2 
                        
                       
                         ( 
                         
                           W 
                           + 
                           1 
                         
                         ) 
                       
                     
                   
                 
               
               
                 
                   ( 
                   4 
                   ) 
                 
               
             
           
         
       
     
         [0031]    From (3) and (4) it follows that the minimal estimated probability for VSW algorithm is 
         [0000]    
       
         
           
             
               
                 
                   
                     
                       p 
                       ^ 
                     
                     
                       m 
                        
                       
                           
                       
                        
                       i 
                        
                       
                           
                       
                        
                       n 
                     
                   
                   = 
                   
                     
                       
                         W 
                         2 
                       
                       - 
                       1 
                     
                     cW 
                   
                 
               
               
                 
                   ( 
                   5 
                   ) 
                 
               
             
           
         
       
     
         [0032]    Equating (5) and (6) gives 
         [0000]    
       
         
           
             
               1 
               
                 2 
                  
                 
                   ( 
                   
                     W 
                     + 
                     1 
                   
                   ) 
                 
               
             
             = 
             
               
                 
                   W 
                   2 
                 
                 - 
                 1 
               
               cW 
             
           
         
       
       
         
           
             c 
             = 
             
               
                 W 
                 - 
                 1 
                 - 
                 
                   2 
                   W 
                 
               
               ≈ 
               
                 W 
                  
                 
                   ( 
                   
                     
                       if 
                        
                       
                           
                       
                        
                       W 
                     
                     &gt;&gt; 
                     1 
                   
                   ) 
                 
               
             
           
         
       
     
         [0033]    Using formula (3) is possible after W symbols entered the window. Therefore, in initial time interval 0&lt;t&lt;W, the probability estimation is calculated by Krichevsky-Trofimov formula as 
         [0000]    
       
         
           
             
               
                 
                   
                     
                       p 
                       ^ 
                     
                     t 
                   
                   = 
                   
                     
                       
                         n 
                         t 
                       
                       + 
                       0.5 
                     
                     
                       t 
                       + 
                       1 
                     
                   
                 
               
               
                 
                   ( 
                   6 
                   ) 
                 
               
             
           
         
       
     
         [0034]    where n t  is the number of ones received in time interval [0,t]. Next, at time moment t=W−1 initialization of ones number in the VSW algorithm is carried out 
         [0000]    
       
         
           
             
               S 
               w 
             
             = 
             
               
                 
                   
                     p 
                     ^ 
                   
                   
                     w 
                     - 
                     1 
                   
                 
                  
                 cW 
               
               = 
               
                 
                   
                     
                       ( 
                       
                         
                           n 
                           
                             w 
                             - 
                             1 
                           
                         
                         + 
                         0.5 
                       
                       ) 
                     
                     W 
                   
                    
                   cW 
                 
                 = 
                 
                   
                     Wn 
                     
                       w 
                       - 
                       1 
                     
                   
                   + 
                   
                     W 
                     2 
                   
                 
               
             
           
         
       
     
         [0035]    where {circumflex over (p)} w−1  is the probability estimation obtained by formula (6) at time t=W−1. At time instants t≧W probability estimation is calculated by formula (3). 
         [0036]    The graphics processing techniques described herein may be implemented in various hardware architectures. For example, graphics functionality may be integrated within a chipset. Alternatively, a discrete graphics processor may be used. As still another embodiment, the graphics functions may be implemented by a general purpose processor, including a multicore processor. 
         [0037]    The present invention may be applicable to a wide range of compression standards in addition to the MQ-coder in JPEG 2000 compressors. As another example, it may be applied to context-adaptive binary arithmetic coding (CABAC) in the H.264 Advanced Video Coding (AVC) ISO 14496 3/09 available from ITU, Geneva, Switzerland, standard compressors. It is also applicable as a low complexity video codec for wireless display for real time wireless video transmission. 
         [0038]    A computer system  130 , shown in  FIG. 2 , may include a hard drive  134  and a removable medium  136 , coupled by a bus  104  to a chipset core logic  110 . The core logic may couple to the graphics processor  112  (via bus  105 ) and the main or host processor  100  in one embodiment. The graphics processor  112  may also be coupled by a bus  106  to a frame buffer  114 . The frame buffer  114  may be coupled by a bus  107  to a display screen  118 , in turn coupled to conventional components by a bus  108 , such as a keyboard or mouse  120 . 
         [0039]    In the case of a software implementation, the pertinent code may be stored in any suitable semiconductor, magnetic or optical memory, including the main memory  132 . Thus, in one embodiment, code  139  may be stored in a machine readable medium, such as main memory  132 , for execution by a processor, such as the processor  100  or the graphics processor  112 . 
         [0040]    In one embodiment, the encoder  10  is part of the graphics processor  112 . The sequence, shown in  FIG. 1 , may be, in one embodiment, software, stored in main memory  132  as indicated at  139 . Of course, such software could be resident on the graphics processor  112  or on any other storage device. 
         [0041]    References throughout this specification to “one embodiment” or “an embodiment” mean that a particular feature, structure, or characteristic described in connection with the embodiment is included in at least one implementation encompassed within the present invention. Thus, appearances of the phrase “one embodiment” or “in an embodiment” are not necessarily referring to the same embodiment. Furthermore, the particular features, structures, or characteristics may be instituted in other suitable forms other than the particular embodiment illustrated and all such forms may be encompassed within the claims of the present application. 
         [0042]    While the present invention has been described with respect to a limited number of embodiments, those skilled in the art will appreciate numerous modifications and variations therefrom. It is intended that the appended claims cover all such modifications and variations as fall within the true spirit and scope of this present invention.