Patent ID: 7970224

Claim:
A method, comprising: examining, by a computing device, respective collections of coefficients out of a plurality of collections of coefficients according to a global coding order of the plurality of collections of coefficients, the respective collections of coefficients having respective priority levels as well as respective pluralities of coding units and truncation points which correspond to the coding units; in response to determining that an examined collection of coefficients out of the plurality of collections of coefficients has a priority level equal to a global priority level, encoding, by the computing device, a first un-encoded coding unit according to a local coding order of the collection of coefficients and reducing the priority level of the collection of coefficients; and after each of the collections of coefficients in the plurality are examined, decreasing, by the computing device, the global priority level; repeating the examining, the encoding, the reducing and the decreasing, by the computing device, for the plurality of collections of coefficients; and terminating the examining, the encoding, the reducing, and the decreasing, by the computing device, in response to determining that a total amount of bits used is greater than a target bit rate.