Patent ID: 8194990

Claim:
A method of compressing a sequence of sequences of n coefficients, n being a positive integer, by jointly determining an output quantization table, an output run-size distribution, and, for each sequence of n coefficients in the sequence of sequences of n coefficients, a final cost-determined sequence of coefficient indices represented by a final cost-determined sequence of (run, size, ID) triples, 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, the method comprising: (a) selecting a 0 th quantization table; (b) selecting a 0 th run-size distribution (c) setting a counter t equal to 0; (d) for each sequence of n coefficients in the sequence of sequences of n coefficients, (i) using a t th quantization table and run-size distribution to formulate a t th cost function for an associated t th plurality of possible sequences of (run, size, ID) triples; (ii) applying the cost function to each possible sequence in the associated t th plurality of possible sequences of (run, size, ID) triples to determine an associated cost; (iii) selecting an associated t th cost-determined sequence of (run, size, ID) triples from the associated t th plurality of possible sequences of (run, size, ID) triples based on the associated cost; (e) after step (d), applying an aggregate cost function to the t th associated cost-determined sequence of (run, size, ID) triples for each sequence of n coefficients in the sequence of sequences of n coefficients, to determine a t th aggregate cost; (f) if the t th aggregate cost meets a selection criterion, selecting the t th quantization table and run-size distribution as the output quantization table and run-size distribution, and, for each sequence of n coefficients in the sequence of sequences of n coefficients, the final cost-determined sequence of coefficient indices represented by the final cost-determined sequence of (run, size, ID) triples as the associated t th sequence of (run, size, ID) triples; otherwise determining a (t+1) th quantization table and run-size distribution from the selected sequence of the t th cost-determined sequences of (run, size, ID) triples, increasing t by one, and returning to step (d); and (g) encoding the corresponding selected sequences of (run, size, ID) using Huffman coding.