TECHNIQUES FOR CONTEXT-ADAPTIVE BINARY DATA ARITHMETIC CODING (CABAC) DECODING
A method for decoding of transform coefficients. The method comprises decoding consecutive bits of an input compressed bitstream; computing a first symbol value using a number of decoded bits; returning the first symbol value if a total number of decoded bits is less than a specified bit count; computing a second symbol value if the total number of decoded bits equals the specified bit count; and returning the second symbol value.
1 . A method for decoding transform coefficients, comprising:
decoding consecutive bits of an input compressed bitstream;
computing a first symbol value using a number of the decoded bits;
returning the first symbol value, if a total number of the decoded bits is less than a specified bit count;
computing a second symbol value, if the total number of the decoded bits equals the specified bit count; and
returning the second symbol value.
2 . The method of claim 1 , wherein computing the first symbol value further comprising:
adding one to the total number of the decoded bits.
3 . The method of claim 1 , wherein computing the second symbol value further comprises:
decoding the input compressed bitstream using an Exponential-Golomb code; and
adding the first symbol value to a result generated by the Exponential-Golomb code decoding.
4 . The method of claim 1 , wherein the input compressed bitstream is a decoded context-adaptive binary data arithmetic coding (CABAC) bitstream.
5 . The method of claim 4 , wherein decoding the consecutive bits, further comprising:
decoding multiple bits having a same value using a same CABAC context.
6 . The method of claim 5 , further comprising:
receiving a context value, the input compressed bitstream, and a CABAC decoder object, wherein the CABAC decoder object includes a range value and an offset value;
computing a sub-range value;
computing a new range value by subtracting the sub-range value from the range value;
checking if the offset value is less than the new range value;
returning a decompressed output bit having a value equal to a most probable symbol (MPS) value, if the offset is less than the new range value; and
returning a decompressed output bit having a value equal to a least probable symbol (LPS), if the offset is bigger or equal to the new range value.
7 . The method of claim 6 , further comprising:
performing a renormalization process;
checking if a zero bit is encountered;
returning a total number of the decoded bits, if a zero bit is encountered;
incrementing a counter counting the total number of the decoded bits, if a zero bit is not encountered; and
returning the total number of the decoded bits, if a specified maximum number of bits were decoded.
8 . The method of claim 7 , wherein performing the renormalization process comprises:
consecutively reading new bits from the input compressed bitstream until a range value is bigger than or equal to a predefined range value (PRV).
9 . The method of claim 1 , wherein decoding the consecutive bits comprises:
computing a minimum number of consecutive most probable symbol bits in the input compressed bitstream; and
advancing a state machine of a CABAC decoder for each bit in the consecutive most probable symbol bits without checking the value of each bit.
10 . The method of claim 9 , further comprising:
receiving a context value, the input compressed bitstream, and a CABAC decoder object, wherein the CABAC decoder object includes a range value and an offset value;
computing a sub-range value using the range value and the offset value;
computing a minimum number of consecutive most probable symbol bits (mpbits) in the input compressed bitstream;
returning a decompressed output bit having a value equals to a most probable symbol value, if the minimum number of consecutive most probable symbol bits is greater than zero; and
returning a decompressed output bit having a value equals to a least probable symbol value, if the minimum number of consecutive most probable symbol bits is equal to zero.
11 . The method of claim 10 , wherein returning the decompressed output bit having a value equal to the most probable symbol value, further comprising:
computing a new range value by subtracting the range value from the sub-range value;
performing a normalization process;
upon completion of the normalization process, checking if a zero bit is encountered in the consecutive most probable symbol bits;
iteratively advancing the state machine of the CABAC decoder for each bit in most probable symbol consecutive bits, if a zero bit is not encountered; and
returning a total number of decoded bits when the zero bit is encountered or a specified bit count is achieved.
12 . A computer readable medium having stored thereon instructions which, when executed by a computer, perform a method for decoding transform coefficients, comprising:
decoding consecutive bits of an input compressed bitstream;
computing a first symbol value using a number of the decoded bits;
returning the first symbol value, if a total number of the decoded bits is less than a specified bit count;
computing a second symbol value, if the total number of the decoded bits equals the specified bit count; and
returning the second symbol value.
13 . A decoder for decoding transform coefficients, comprising:
a context-adaptive binary data arithmetic coding (CABAC) decoder for decoding consecutive bits of an input compressed bitstream;
a first adder for computing a first symbol value by adding one to a number of the decoded bits;
a comparator for determining if a total number of the decoded bits equal to a specified maximum number;
an Exponential-Golomb code decoder for decoding the input compressed bitstream if the total number of the decoded bits equal to the specified bit count; and
a second adder for generating a second symbol value by adding the first symbol valve to a result generated by the Exponential-Golomb code decoder.
14 . The decoder of claim 4 , wherein decoding the consecutive bits, further comprising:
decoding multiple bits having a same value using a same CABAC context.
15 . The decoder of claim 14 , further comprising:
receiving a context value, the input compressed bitstream, and a CABAC decoder object, wherein the CABAC decoder object includes a range value and an offset value;
computing a sub-range value;
computing a new range value by subtracting the range value from the sub-range value;
checking if the offset value is teas than the new range value;
returning a decompressed output bit having a value equal to a most probable symbol (MPS) value, if the offset is less than the new range value; and
returning a decompressed output bit having a value equal to a least probable symbol (LPS), if the offset is bigger or equal to the new range value.
16 . The decoder of claim 15 , further comprising:
performing a renormalization process;
checking if a zero bit is encountered;
returning a total number of the decoded bits, if a zero bit is encountered;
incrementing a counter counting the total number of the decoded bits, if a zero bit is not encountered; and
returning the total number of decoded bits, if a specified maximum number of bits were decoded.
17 . The decoder of claim 16 , wherein performing the renormalization process comprises:
consecutively reading new bits from the input compressed bitstream until a range value is bigger than or equal to a predefined range value (PRV).
18 . The decoder of claim 13 , wherein decoding the consecutive bits comprises:
computing a minimum number of consecutive most probable symbol bits in the input compressed bitstream; and
advancing a state machine of a CABAC decoder for each bit in the consecutive most probable symbol bits without checking the value of each bit.
19 . The decoder of claim 18 , further comprising:
receiving a context value, the Input compressed bitstream, and a CABAC decoder object, wherein the CABAC decoder object includes a range value and an offset value;
computing a sub-range value using the range value and the offset value;
computing a minimum number of consecutive most probable symbol bits (mpbits) in the input compressed bitstream;
returning a decompressed output bit having a value equals to a most probable symbol value, if the minimum number of consecutive most probable symbol bits is greater than zero; and
returning a decompressed output bit having a value equals to a least probable symbol value, if the minimum number of consecutive most probable symbol bits is equal to zero.
20 . The decoder of claim 19 , wherein returning the decompressed output bit having a value equals to the most probable symbol value, further comprising:
computing a new range value by subtracting the range value from the sub-range value;
performing a normalization process;
upon completion of the normalization process, checking if a zero bit is encountered in the consecutive most probable symbol bits;
iteratively advancing the state machine of the CABAC decoder for each bit in most probable symbol consecutive bits, if a zero bit is not encountered; and
returning a total number of decoded bits when the zero bit is encountered or a specified bit count is achieved.