Patent attributes
A method and apparatus for decoding a bitstream. The method may include generating an indication of a number of coefficients and a number of trailing ones in a portion of a bitstream using either a first lookup table (LUT) indexed by a number of leading zeros to return a number of remaining bits in a code and a second LUT indexed by both the number of leading zeros and the remaining code bits to return the number of coefficients and the number of trailing ones or bit parsing processing when the leading zeros value equals a predetermined value, generating an indication of a number of total zeros, including using either a third LUT indexed by the number of coefficients and bits of the bitstream when the number of coefficients is in a first range or bit level processing when the number of coefficients is outside the first range, generating an indication of one or more run before values using either a fourth LUT indexed by the number of coefficients and bits of the bitstream when a zeros left value is in a second range or bit parsing processing when the zeros left is not in the second range, and generating coefficients in block positions in response to the generation of the trailing ones value, the number of coefficients value, the total zeros value and run before values.