• Debargha Mukherjee's avatar
    Adds binary code lib for coding various symbols · 47748b56
    Debargha Mukherjee authored
    Adds a variable length binary code library for
    coding various symbols for typical use in headers.
    
    The main codes implemented are:
    1. Coding a symbol from an n-ary alphabet using a
    quasi-uniform code.
    2. A bilevel code for coding symbols from an n-ary
    alphabet based on a reference value for the symbol
    also taken from the same alphabet.
    The code has two steps. If the symbol is close to
    the reference a shorter code is used, while if it is
    farther away a longer code is used.
    3. A finite (terminated) subexponential code that codes
    a symbol from an n-ary alphabet using subexp parameter k.
    4. A finite (terminated) subexponential code that codes
    a symbol from an n-ary alphabet using subexp parameter k,
    based on a given reference also taken from the same
    alphabet. This code essentially reorders the values
    before using the same code as 3.
    
    Also adds corresponding encoder side functions to count
    the number of bits used.
    
    These codes will be subsequently used for more efficient
    encoding of loop-restoration parameters and global motion
    parameters.
    
    Change-Id: I28c82b611925c1ab17f544c48c4b1287930764b7
    47748b56
binary_codes_writer.c 5.54 KB