30 uint16_t predict_table[5786 * 2];
35 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
36 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
37 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
38 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
39 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
40 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7
50 -1, -1, 2, 6, -1, -1, 2, 6
55 -1, -1, -1, -1, 1, 2, 4, 6,
56 -1, -1, -1, -1, 1, 2, 4, 6
61 -1, -1, -1, -1, -1, -1, -1, -1,
62 1, 1, 1, 2, 2, 4, 5, 6,
63 -1, -1, -1, -1, -1, -1, -1, -1,
64 1, 1, 1, 2, 2, 4, 5, 6
69 -1, -1, -1, -1, -1, -1, -1, -1,
70 -1, -1, -1, -1, -1, -1, -1, -1,
71 1, 1, 1, 1, 1, 2, 2, 2,
72 2, 4, 4, 4, 5, 5, 6, 6,
73 -1, -1, -1, -1, -1, -1, -1, -1,
74 -1, -1, -1, -1, -1, -1, -1, -1,
75 1, 1, 1, 1, 1, 2, 2, 2,
76 2, 4, 4, 4, 5, 5, 6, 6
81 -1, -1, -1, -1, -1, -1, -1, -1,
82 -1, -1, -1, -1, -1, -1, -1, -1,
83 -1, -1, -1, -1, -1, -1, -1, -1,
84 -1, -1, -1, -1, -1, -1, -1, -1,
85 1, 1, 1, 1, 1, 1, 1, 1,
86 1, 1, 2, 2, 2, 2, 2, 2,
87 2, 2, 4, 4, 4, 4, 4, 4,
88 5, 5, 5, 5, 6, 6, 6, 6,
89 -1, -1, -1, -1, -1, -1, -1, -1,
90 -1, -1, -1, -1, -1, -1, -1, -1,
91 -1, -1, -1, -1, -1, -1, -1, -1,
92 -1, -1, -1, -1, -1, -1, -1, -1,
93 1, 1, 1, 1, 1, 1, 1, 1,
94 1, 1, 2, 2, 2, 2, 2, 2,
95 2, 2, 4, 4, 4, 4, 4, 4,
96 5, 5, 5, 5, 6, 6, 6, 6
110 for (start_pos = 0; start_pos < 64; start_pos++) {
111 unsigned int dest_pos, table_pos;
113 for (table_pos = 0, dest_pos = start_pos;
115 table_pos++, dest_pos += 64) {
116 int put = 0, count, table_value;
119 for (count = 32; count != 0; count >>= 1) {
120 if (start_pos & count)
142 int8_t channel_hint[2];
143 int ret, chan, channels = 1;
151 if (samples == 0xffffffff) {
156 if (samples > pkt->
size * 2)
160 if (channel_hint[0] & 0x80) {
161 channel_hint[0] = ~channel_hint[0];
179 for (chan = 0; chan < channels; chan++) {
180 uint16_t *dest = (uint16_t*)vima->
frame.
data[0] + chan;
181 int step_index = channel_hint[chan];
182 int output = pcm_data[chan];
186 int lookup_size,
lookup, highbit, lowbits;
188 step_index = av_clip(step_index, 0, 88);
190 lookup =
get_bits(&gb, lookup_size);
191 highbit = 1 << (lookup_size - 1);
192 lowbits = highbit - 1;
194 if (lookup & highbit)
199 if (lookup == lowbits) {
202 int predict_index,
diff;
204 predict_index = (lookup << (7 - lookup_size)) | (step_index << 6);
205 predict_index = av_clip(predict_index, 0, 5785);
212 output = av_clip_int16(output + diff);