Patent ID: 7978923

Claim:
A method of compressing a sequence of n coefficients by determining a cost-determined sequence of n coefficient indices represented by a cost-determined sequence of (run, index derivative) pairs under a given quantization table and run-index derivative coding distribution, wherein each sequence of (run, index derivative) pairs defines a corresponding sequence of coefficient indices such that each index in the corresponding sequence of coefficient indices is a digital number, the corresponding sequence of coefficient indices includes a plurality of values including a special value, and each (run, index derivative) pair defines a run value representing a number of consecutive indices of the special value, and an index-based value derived from a value of the index following the number of consecutive indices of the special value, the method comprising the steps of: (a) using the given quantization table and run-index derivative coding distribution to formulate a cost function for a plurality of possible sequences of (run, index derivative) pairs; (b) applying the cost function to each possible sequence in the plurality of possible sequences of (run, index derivative) pairs to determine an associated cost of each of the plurality of possible sequences of (run, index derivative) pairs; and, (c) selecting the cost-determined sequence of (run, index derivative) pairs from the plurality of possible sequences of (run, index derivative) pairs based on the associated cost of each of the plurality of possible sequences of (run, index derivative) pairs; and encoding the cost-determined sequence of (run, index derivative) pairs using entropy coding based on a run-index derivative coding distribution, wherein selecting the cost-determined sequence of (run, index derivative) pairs comprises: (i) providing a sequence of n super nodes, each super node comprising at least one node, in one-to-one relation with the sequence of n coefficients, such that each coefficient C i has a corresponding i th super node wherein i is greater than or equal to 1 and less than or equal to n; (ii) providing an initial node preceding and an end node following the sequence of n super nodes; (iii) providing a plurality of connections between pairs of nodes including the initial node, super nodes, and the end node to represent a plurality of possible (run, index derivative) pairs; (iv) determining the associated cost of each of the plurality of possible sequences of (run, index derivative) pairs by determining an associated incremental cost for each connection in the plurality of connections; (v) determining a least cost sequence of connections from the plurality of connections, wherein the least cost sequence of connections extends from the initial node to the end node via at least one super node; and, (vi) determining the cost-determined sequence of (run, index derivative) pairs from the least cost sequence of connections.