Patent ID: 8712783

Claim:
A computer-readable memory or storage device storing computer-executable instructions for causing a computing device that implements an encoder to perform a method of encoding audio or video data, the method comprising: performing a frequency transform on a block of plural samples to produce plural transform coefficients; quantizing the plural transform coefficients; and entropy coding the plural quantized transform coefficients, wherein the entropy coding includes: encoding one or more of the plural quantized transform coefficients using a direct level encoding mode, including performing first context-adaptive arithmetic coding of a level value of a given coefficient of the plural quantized transform coefficients, wherein the first context-adaptive arithmetic coding uses a first set of plural contexts, and wherein the first context-adaptive arithmetic coding includes selecting one of the first set of plural contexts based at least in part on level values of two previously encoded quantized transform coefficients; switching to a run-level encoding mode for remaining coefficients of the plural quantized transform coefficients; encoding the remaining quantized transform coefficients using the run-level encoding mode, including: performing second context-adaptive arithmetic coding of a non-zero level value of one of the remaining quantized transform coefficients, wherein the second context-adaptive arithmetic coding uses a second set of plural contexts different than the first set of plural contexts, and wherein the second context-adaptive arithmetic coding includes selecting one of the second set of plural contexts based at least in part on a level value of a previously encoded quantized transform coefficient; and performing third context-adaptive arithmetic coding of a run value, the run value indicating a count of consecutive zero-value remaining quantized transform coefficients adjacent the remaining quantized transform coefficient with the non-zero level value, wherein the third context-adaptive arithmetic coding uses a third set of plural contexts different than the first set of plural contexts and different than the second set of plural contexts.