Patent ID: 7949195

Claim:
A method comprising: (a) for an ordered sequence of quantized transform coefficients of a block of image data, the quantized transform coefficients having respective amplitudes including a most likely-to-occur amplitude and at least one other amplitude, and for a selected low-frequency variable length coding method that includes recognizing events that each includes a cluster of coefficients having respective amplitudes other than the most likely-to-occur amplitude, (a1) determining a set of possible breakpoints, each breakpoint being defined by an ending event location for events recognized in using the selected low-frequency variable length coding method, and (a2) determining the results of coding the ordered sequence using a hybrid coding method that includes using the selected low-frequency coding method until the ending event, and using a selected high-frequency method to encode a part of the sequence starting from immediately after the ending event; (b) comparing the results determined in (a2) to encode the sequence for each of the set of possible breakpoints determined in (a1), each possible breakpoint defined by an ending event recognized using the selected low-frequency variable length coding method, the result for a particular possible breakpoint of the set being the sum of a first number of bits resulting from the encoding a first part of the sequence up to and including the ending event of the particular possible breakpoint using the selected low-frequency variable length coding method, and a second number of bits resulting from encoding a second part of the sequence starting from the coefficient immediately after the ending event of the particular possible breakpoint using the selected high-frequency variable length coding method, wherein for each of the set of possible breakpoints, the first number of bits for encoding a first part of the sequence up to and including the ending event of the breakpoint is determined using the selected low-frequency variable length coding method in a forward-scan order such that a first set of first numbers of bits is determined, and for each of the set of possible breakpoints, the second number of bits for encoding a second part of the sequence starting from the coefficient immediately after the ending events is determined using the high-frequency variable length coding in a reverse-scan order, such that a second set of second numbers of bits determined; (c) selecting as a final ending event the possible ending event that results in the least sum of a first number of bits from the first set and a second number of bits from the second set; and (d) encoding the sequence including encoding a first portion of the sequence up to and including the final ending event using the selected low-frequency variable length coding method and encoding a second portion of the sequence from the first coefficient after the final ending event to the end of the sequence using the selected high-frequency variable length coding method.