|
|
|
|
|
|
|
|
|
|
|
const int16_t ulaw_decode_table[256] = { |
|
|
|
|
|
0, 8, 16, 24, 32, 40, 48, 56, 64, 72, |
|
|
|
|
|
80, 88, 96, 104, 112, 120, 128, 144, 160, 176, |
|
|
|
|
|
192, 208, 224, 240, 256, 272, 288, 304, 320, 336, |
|
|
|
|
|
352, 368, 384, 416, 448, 480, 512, 544, 576, 608, |
|
|
|
|
|
640, 672, 704, 736, 768, 800, 832, 864, 896, 960, |
|
|
|
|
|
1024, 1088, 1152, 1216, 1280, 1344, 1408, 1472, 1536, 1600, |
|
|
|
|
|
1664, 1728, 1792, 1856, 1920, 2048, 2176, 2304, 2432, 2560, |
|
|
|
|
|
2688, 2816, 2944, 3072, 3200, 3328, 3456, 3584, 3712, 3840, |
|
|
|
|
|
3968, 4224, 4480, 4736, 4992, 5248, 5504, 5760, 6016, 6272, |
|
|
|
|
|
6528, 6784, 7040, 7296, 7552, 7808, 8064, 8576, 9088, 9600, |
|
|
|
|
|
10112, 10624, 11136, 11648, 12160, 12672, 13184, 13696, 14208, 14720, |
|
|
|
|
|
15232, 15744, 16256, 17280, 18304, 19328, 20352, 21376, 22400, 23424, |
|
|
|
|
|
24448, 25472, 26496, 27520, 28544, 29568, 30592, 31616, 0, -8, |
|
|
|
|
|
-16, -24, -32, -40, -48, -56, -64, -72, -80, -88, |
|
|
|
|
|
-96, -104, -112, -120, -128, -144, -160, -176, -192, -208, |
|
|
|
|
|
-224, -240, -256, -272, -288, -304, -320, -336, -352, -368, |
|
|
|
|
|
-384, -416, -448, -480, -512, -544, -576, -608, -640, -672, |
|
|
|
|
|
-704, -736, -768, -800, -832, -864, -896, -960, -1024, -1088, |
|
|
|
|
|
-1152, -1216, -1280, -1344, -1408, -1472, -1536, -1600, -1664, -1728, |
|
|
|
|
|
-1792, -1856, -1920, -2048, -2176, -2304, -2432, -2560, -2688, -2816, |
|
|
|
|
|
-2944, -3072, -3200, -3328, -3456, -3584, -3712, -3840, -3968, -4224, |
|
|
|
|
|
-4480, -4736, -4992, -5248, -5504, -5760, -6016, -6272, -6528, -6784, |
|
|
|
|
|
-7040, -7296, -7552, -7808, -8064, -8576, -9088, -9600,-10112,-10624, |
|
|
|
|
|
-11136,-11648,-12160,-12672,-13184,-13696,-14208,-14720,-15232,-15744, |
|
|
|
|
|
-16256,-17280,-18304,-19328,-20352,-21376,-22400,-23424,-24448,-25472, |
|
|
|
|
|
-26496,-27520,-28544,-29568,-30592,-31616 |
|
|
|
|
|
}; |
|
|
|
|
|
/* |
|
|
|
|
|
#! /usr/bin/perl |
|
|
|
|
|
print "const int16_t ulaw_decode_table[256] = {\n"; |
|
|
|
|
|
for ($i=0; $i < 256; $i++) { |
|
|
|
|
|
$r = ($i >> 4) & 7; |
|
|
|
|
|
$n = ($i & 0xF) << ($r + 3); |
|
|
|
|
|
$n |= 1 << ($r + 7); |
|
|
|
|
|
$n -= 128; |
|
|
|
|
|
$n *= -1 if $i > 127; |
|
|
|
|
|
printf "%6d", $n + 0; |
|
|
|
|
|
print "," if ($i < 255); |
|
|
|
|
|
print "\n" if ($i % 10) == 9; |
|
|
|
|
|
} |
|
|
|
|
|
print "\n};\n"; |
|
|
|
|
|
*/ |