29 uint16_t predict_table[5786 * 2];
34 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
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 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
38 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
39 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7
49 -1, -1, 2, 6, -1, -1, 2, 6
54 -1, -1, -1, -1, 1, 2, 4, 6,
55 -1, -1, -1, -1, 1, 2, 4, 6
60 -1, -1, -1, -1, -1, -1, -1, -1,
61 1, 1, 1, 2, 2, 4, 5, 6,
62 -1, -1, -1, -1, -1, -1, -1, -1,
63 1, 1, 1, 2, 2, 4, 5, 6
68 -1, -1, -1, -1, -1, -1, -1, -1,
69 -1, -1, -1, -1, -1, -1, -1, -1,
70 1, 1, 1, 1, 1, 2, 2, 2,
71 2, 4, 4, 4, 5, 5, 6, 6,
72 -1, -1, -1, -1, -1, -1, -1, -1,
73 -1, -1, -1, -1, -1, -1, -1, -1,
74 1, 1, 1, 1, 1, 2, 2, 2,
75 2, 4, 4, 4, 5, 5, 6, 6
80 -1, -1, -1, -1, -1, -1, -1, -1,
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, 2, 2, 2, 2, 2, 2,
86 2, 2, 4, 4, 4, 4, 4, 4,
87 5, 5, 5, 5, 6, 6, 6, 6,
88 -1, -1, -1, -1, -1, -1, -1, -1,
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, 2, 2, 2, 2, 2, 2,
94 2, 2, 4, 4, 4, 4, 4, 4,
95 5, 5, 5, 5, 6, 6, 6, 6
109 for (start_pos = 0; start_pos < 64; start_pos++) {
110 unsigned int dest_pos, table_pos;
112 for (table_pos = 0, dest_pos = start_pos;
114 table_pos++, dest_pos += 64) {
115 int put = 0, count, table_value;
118 for (count = 32; count != 0; count >>= 1) {
119 if (start_pos & count)
140 int8_t channel_hint[2];
141 int ret, chan, channels = 1;
150 if (samples == 0xffffffff) {
155 if (samples > pkt->
size * 2)
159 if (channel_hint[0] & 0x80) {
160 channel_hint[0] = ~channel_hint[0];
178 for (chan = 0; chan < channels; chan++) {
179 uint16_t *dest = (uint16_t*)frame->
data[0] + chan;
180 int step_index = channel_hint[chan];
181 int output = pcm_data[chan];
185 int lookup_size,
lookup, highbit, lowbits;
187 step_index = av_clip(step_index, 0, 88);
189 lookup =
get_bits(&gb, lookup_size);
190 highbit = 1 << (lookup_size - 1);
191 lowbits = highbit - 1;
193 if (lookup & highbit)
198 if (lookup == lowbits) {
201 int predict_index,
diff;
203 predict_index = (lookup << (7 - lookup_size)) | (step_index << 6);
204 predict_index = av_clip(predict_index, 0, 5785);
211 output = av_clip_int16(output + diff);