Patent ID: 8509557

Claim:
A method of compressing a sequence of n coefficients by jointly determining an output quantization table, a cost-determined sequence of coefficient indices represented by a cost-determined sequence of (run, size, ID) triples, and a run-size distribution, wherein each sequence of (run, size, ID) triples defines a corresponding sequence of coefficient indices such that (i) each index in the corresponding sequence of coefficient indices is a digital number, (ii) the corresponding sequence of coefficient indices includes a plurality of values including a special value, and (iii) each (run, size, ID) triple defines a run value representing a number of consecutive indices of the special value, an integer value ID specifying the amplitude of the index following the number of consecutive indices of the special value, and a size value defining a number of bits required to store an index within a category specified by the ID value, and wherein a sequence of coefficient indices together with a quantization table determines a sequence of n soft-decision quantized coefficients, n being a positive integer, the method comprising: (a) determining a 0 th quantization table; (b) determining a 0 th run-size distribution; (c) setting a counter t equal to 0; (d) applying a t th quantization table and t th run-size distribution to each possible sequence in a t th plurality of possible sequences of (run, size, ID) triples to determine an associated cost; (e) determining a t th cost-determined sequence of (run, size, ID) triples from the t th plurality of possible sequences of (run, size, ID) triples based on the associated cost; (f) if the t th cost-determined sequence of (run, size, ID) triples, together with the t th quantization table and run-size distribution, meets a selection criterion, selecting the t th cost-determined sequence of (run, size, ID) triples as the cost-determined sequence of (run, size, ID) triples, and the t th quantization table as the output quantization table; otherwise determining a (t+1) th quantization table and run-size distribution from the t th cost-determined sequence of (run, size, ID) triples, increasing t by one, and returning to step (d); and (g) encoding the corresponding selected sequence of (run, size, ID) triples using Huffman coding.