title: Methods for Exp-Golomb CodeWord Construction and Parsing
body: <p>I am working with OpenH264 Codec. OpenH264 is using Exp-Golomb Coding for header related information. I have studied several websites and gathered a little information about Exp-Golomb Coding. OpenH264 uses 4 types of Exp-Golomb coding methods. They are: </p>
  
  <ul>
  <li><strong>Ue</strong> [When values are only Non-Negative quantity]</li>
  <li><strong>Te</strong> [when values are only 1 or 0]</li>
  <li><strong>Se</strong> [when values are both negative and positive quantity]</li>
  <li><strong>Me</strong> [when values a standard code map is defined for values]</li>
  </ul>
  
  <p>I have learnt how to Construct or Parse by Method <strong>Ue</strong>. <br/> <br/> 
  Syntax Format for Exp-Golomb(Ue) = [M-Zeros][1][INFO]. <br/> <br/>
  <strong>Construction:</strong> Suppose We have a Code_Num = 226. <br/>
  Now, <br/>
  M = floor(log2(Code_Num)) = floor(log2(226)) = 7 <br/>
  INFO = Code_Num + 1 - pow(2,M) = 226 + 1 - 128 = 99 = (1100011) in Binary <br/>
  So, <br/>
  CodeWord = 0000000 1 1100011 [M-zeros, 1 ignoring bit, INFO] <br/>
  <br/>
  <strong>Parsing:</strong> 
  Suppose We have a CodeWord = 000000011100011 <br/>
  Code_Num = pow(2,M) + INFO - 1 = 128 + 99 - 1 = 226 <br/></p>
  
  <p>Now I can calculate Exp-Golomb(Ue). But I want to learn all the theories related Se, Te and Me. But I am unable to find any resources for other methods. Please help me.      </p>