mcelp 1.0.1

Mitsubishi CELP speech codec: a 3.6 kbit/s speech encoder and decoder
Documentation
//! The gain codebook and the logarithm tables its predictor uses.

/// MA predictor for the fixed-codebook gain, 4 taps.
pub static GAIN_PRED: [i16; 4] = [5571, 4096, 2703, 1311];

/// First stage of the conjugate gain codebook: 8 entries x (pitch gain,
/// code-gain correction).
pub static GAIN_CB1: [i16; 16] = [
    171, 6, 1530, 603, 671, 328, 2080, 1715, 2415, 151, 5492, 824, 5698, 303, 4344, 7277,
];

/// Second stage of the conjugate gain codebook: 16 entries x 2.
pub static GAIN_CB2: [i16; 32] = [
    0, 5, 6989, 130, 0, 176, 13739, 113, 3905, 86, 9621, 161, 2005, 618, 4479, 3090, 1038, 84,
    8071, 265, 1139, 268, 16796, 398, 5194, 184, 11037, 238, 8103, 1022, 20784, 13790,
];

/// 2^x table, 33 entries.
pub static POW2: [i16; 33] = [
    16384, 16743, 17109, 17484, 17867, 18258, 18658, 19066, 19484, 19911, 20347, 20792, 21247,
    21713, 22188, 22674, 23170, 23678, 24196, 24726, 25268, 25821, 26386, 26964, 27554, 28158,
    28774, 29405, 30048, 30706, 31379, 32066, 32767,
];

/// log2 table, 33 entries.
pub static LOG2: [i16; 33] = [
    0, 1455, 2866, 4236, 5568, 6863, 8124, 9352, 10549, 11716, 12855, 13967, 15054, 16117, 17156,
    18172, 19167, 20142, 21097, 22033, 22951, 23852, 24735, 25603, 26455, 27291, 28113, 28922,
    29716, 30497, 31266, 32023, 32767,
];