Exponential-Golomb coding: Difference between revisions

Content deleted Content added
See also: improved links
No edit summary
Line 1:
An '''exponential-Golomb code''' (or just '''Exp-Golomb code''') is a type of [[Universal code (data compression)|universal code]]. To encode any [[nonnegative integer]] ''x'' using the exp-Golomb code:
# Write down ''x''+1 in binary
# Count the bits written, subtract one, and write that number of starting zero bits preceding the previous bit string.
Line 18:
 
==Extension to negative numbers==
Exp-Golomb coding for ''k'' = 0 is used in the [[H.264/MPEG-4 AVC]] and H.265 [[High Efficiency Video Coding]] video compression standards, in which there is also a variation for the coding of signed numbers by assigning the value 0 to the binary codeword '0' and assigning subsequent codewords to input values of increasing magnitude (and alternating sign, if the field can contain a negative number):
0 ⇒ 0 ⇒ 1 ⇒ 1
1 ⇒ 1 ⇒ 10 ⇒ 010